/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent text size adjustment on iOS */
}

/* Better scrolling on iOS */
body {
    -webkit-overflow-scrolling: touch;
}

:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Build Number */
.build-number {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.build-number:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.tagline {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 300;
}

.add-promise-btn {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.add-promise-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Search Container */
.search-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    margin-top: 20px;
}

.search-container .container {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#searchBtn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#searchBtn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

.refresh-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.refresh-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.refresh-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Filter Container */
.filter-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    margin-top: 2px;
}

.filter-container .container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.filter-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

/* Searched/Highlighted Promise */
.promise-card.searched {
    border: 4px solid #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2), 0 20px 60px rgba(251, 191, 36, 0.3);
    position: relative;
    animation: pulseGlow 2s ease-in-out infinite;
    order: -999; /* Bring to top of grid */
    scroll-margin-top: 150px; /* Space from top when scrolled into view */
    margin-top: 30px; /* Extra spacing from elements above to show FOUND badge */
    overflow: visible; /* Allow FOUND badge to show above card */
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2), 0 20px 60px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.4), 0 25px 70px rgba(251, 191, 36, 0.5);
    }
}

.promise-card.searched::after {
    content: '📌 your promise';
    position: absolute;
    top: -12px;
    right: 20px;
    background: #fbbf24;
    color: #78350f;
    padding: 6px 20px;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    z-index: 10;
    letter-spacing: 1px;
}

/* Promise Wall */
main {
    padding: 60px 20px 40px;
    min-height: 60vh;
}

main.main-content {
    margin-top: 30px;
}

.promise-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Promise Card */
.promise-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: cardPop 0.5s ease;
}

@keyframes cardPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.promise-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.promise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 20px 20px 0 0;
}

.promise-card.personal::before { background: var(--gradient-1); }
.promise-card.work::before { background: var(--gradient-2); }
.promise-card.health::before { background: var(--gradient-3); }
.promise-card.relationships::before { background: var(--gradient-4); }
.promise-card.fun::before { background: var(--gradient-5); }
.promise-card.other::before { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

.promise-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.promise-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.promise-id {
    background: #f3f4f6;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.category-badge {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge.personal { background: #ddd6fe; color: #5b21b6; }
.category-badge.work { background: #fce7f3; color: #be185d; }
.category-badge.health { background: #dbeafe; color: #1e40af; }
.category-badge.relationships { background: #d1fae5; color: #065f46; }
.category-badge.fun { background: #fef3c7; color: #92400e; }
.category-badge.other { background: #f3e8ff; color: #6b21a8; }

.promise-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    line-height: 1.4;
}

.promise-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.promise-deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.countdown-item {
    background: #f9fafb;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Progress Bar */
.progress-container {
    margin-top: 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Share Button */
.share-promise-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.share-promise-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-promise-btn:active {
    transform: translateY(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 25px;
    max-width: 600px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--danger);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Error Box */
.error-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: start;
    gap: 15px;
}

.error-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.error-content h3 {
    color: #92400e;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.error-content {
    flex: 1;
}

#promiseErrorMessage {
    color: #78350f;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-line;
}

#promiseErrorMessage p {
    margin: 8px 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Field-specific error messages */
.field-error {
    display: none;
    margin-top: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #991b1b;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

.field-error:not(:empty) {
    display: block;
}

.field-error::before {
    content: "⚠️ ";
    margin-right: 5px;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group.has-error input:focus,
.form-group.has-error textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Privacy Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.checkbox-wrapper:has(input:checked) {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.checkbox-text {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.checkbox-hint {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Honeypot field - hidden from users */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.captcha {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

#captchaQuestion {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Ad Modal */
.success-modal {
    z-index: 1001 !important;
}

.success-modal.active {
    display: block !important;
}

.success-modal .modal-content {
    max-width: 550px;
}

.success-content h2 {
    margin-bottom: 20px;
}

/* Promise ID Warning */
.promise-id-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.promise-id-warning h3 {
    color: #92400e;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.promise-id-display {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.promise-id-code {
    font-size: 1.8rem;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    padding: 8px 15px;
    background: #f3f4f6;
    border-radius: 8px;
    user-select: all;
}

.copy-id-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.copy-id-btn:hover {
    background: #4f46e5;
    transform: scale(1.05);
}

.copy-id-btn:active {
    transform: scale(0.95);
}

.copy-id-btn.copied {
    background: var(--success);
}

.warning-message {
    color: #92400e;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 10px 0 0 0;
}

.sponsor-space {
    margin: 25px 0;
}

.sponsor-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px;
    border-radius: 15px;
    text-align: center;
    border: 2px dashed #9ca3af;
}

.sponsor-message {
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
}

.close-ad,
.continue-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.continue-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

/* AdSense Banner */
.adsense-banner {
    background: white;
    padding: 30px;
    margin-top: 40px;
}

.ad-placeholder {
    max-width: 970px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px dashed #9ca3af;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    text-align: center;
    color: var(--dark);
    font-weight: 500;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-tagline {
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-secondary);
}

.footer-copyright {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Legal Modals */
.legal-modal .modal-content {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.legal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-right: 40px;
}

.legal-text {
    line-height: 1.8;
    color: var(--text-primary);
}

.legal-text h3 {
    color: var(--dark);
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.legal-text p {
    margin-bottom: 15px;
}

.legal-text ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.legal-text li {
    margin-bottom: 8px;
}

/* Responsive Design */

/* Tablets and small laptops (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .promise-wall {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .modal-content {
        max-width: 90%;
        margin: 5% auto;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    /* Header */
    .logo {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    header .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .header-left {
        align-items: center;
    }

    .header-right {
        justify-content: center;
        width: 100%;
    }

    .add-promise-btn {
        width: 100%;
        max-width: 300px;
    }

    /* Search Bar */
    .search-container .container {
        flex-direction: column;
        max-width: 100%;
        gap: 12px;
    }

    #searchInput {
        width: 100%;
    }

    #searchBtn,
    .refresh-btn {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        justify-content: center; /* Center text on mobile */
    }

    /* Filter Buttons */
    .filter-container .container {
        gap: 8px;
        justify-content: center;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        flex: 1;
        min-width: 80px;
    }

    /* Promise Cards */
    .promise-wall {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .promise-card {
        padding: 20px;
    }

    .promise-title {
        font-size: 1.2rem;
    }

    .countdown {
        gap: 6px;
    }

    .countdown-value {
        font-size: 1.3rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    /* Modal */
    .modal-content {
        margin: 5% auto;
        max-width: calc(100% - 30px); /* Center with equal margins */
        padding: 30px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
        padding-right: 40px; /* Make space for close button */
    }

    /* Close button - more space from title on mobile */
    .close {
        right: 15px;
        top: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    /* Success Modal */
    .success-content h2 {
        text-align: center;
        padding-right: 0 !important; /* Override padding for center alignment */
        padding-left: 0 !important; /* Ensure full centering */
        font-size: 1.4rem; /* Slightly smaller for mobile */
        margin-bottom: 15px; /* Reduce margin */
    }

    .success-modal .modal-content {
        max-height: 92vh; /* Increased height to fit all content */
        overflow-y: auto;
        padding: 25px 15px; /* Reduce padding slightly */
    }

    .success-modal .close {
        right: 15px;
        top: 15px;
    }

    /* Promise ID Warning - compact on mobile */
    .success-modal .promise-id-warning {
        padding: 18px;
        margin-bottom: 20px;
    }

    .success-modal .promise-id-warning h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .success-modal .warning-message {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Ad space - compact on mobile */
    .success-modal .sponsor-space {
        margin: 18px 0;
    }

    .success-modal .sponsor-placeholder {
        padding: 40px 20px;
    }

    .promise-id-warning {
        padding: 20px;
    }

    .promise-id-warning h3 {
        font-size: 1.2rem;
    }

    .promise-id-code {
        font-size: 1.2rem;
    }

    /* Empty State */
    .empty-state {
        padding: 60px 20px;
    }

    .empty-icon {
        font-size: 4rem;
    }

    .empty-state h2 {
        font-size: 1.6rem;
    }

    /* Footer */
    footer {
        padding: 20px;
        font-size: 0.9rem;
    }
}

/* Large Phones (640px and below) */
@media (max-width: 640px) {
    /* Header */
    .logo {
        font-size: 1.8rem;
    }

    header {
        padding: 20px 0;
    }

    /* Search */
    .search-container,
    .filter-container {
        padding: 15px 0;
    }

    /* Promise Cards */
    .promise-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .promise-id {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .category-badge {
        font-size: 0.65rem;
        padding: 4px 12px;
    }

    .share-promise-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .promise-title {
        font-size: 1.1rem;
    }

    .promise-description {
        font-size: 0.9rem;
    }

    /* Countdown - 2x2 grid on small screens */
    .countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .countdown-item {
        padding: 12px 8px;
    }

    .countdown-value {
        font-size: 1.4rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    /* Modal */
    .modal-content {
        margin: 3% auto;
        max-width: calc(100% - 20px); /* Center with equal margins */
        padding: 25px 15px;
        border-radius: 15px;
    }

    .modal-content h2 {
        font-size: 1.4rem;
        padding-right: 40px; /* Make space for close button */
    }

    /* Close button positioning */
    .close {
        right: 12px;
        top: 12px;
    }

    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }

    label {
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 16px;
        font-size: 1rem;
    }

    /* Close buttons - bigger touch targets */
    .close,
    .close-ad {
        width: 40px;
        height: 40px;
        font-size: 2rem;
        line-height: 40px;
    }
}

/* Small Phones (480px and below) */
@media (max-width: 480px) {
    /* Header */
    .logo {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 0.75rem;
    }

    .add-promise-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Filter buttons - smaller on tiny screens */
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-width: 70px;
    }

    /* Promise Cards */
    .promise-card {
        padding: 15px;
    }

    .promise-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .promise-description {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .promise-deadline {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    /* Countdown */
    .countdown-item {
        padding: 10px 6px;
    }

    .countdown-value {
        font-size: 1.2rem;
    }

    .countdown-label {
        font-size: 0.6rem;
    }

    /* Progress Bar */
    .progress-label {
        font-size: 0.75rem;
    }

    .progress-bar {
        height: 10px;
    }

    /* Modal */
    .modal-content {
        margin: 2% auto;
        max-width: calc(100% - 16px); /* Center with equal margins */
        padding: 22px 12px;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
        padding-right: 35px; /* Make space for close button */
    }

    /* Close button positioning */
    .close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }

    .form-group {
        margin-bottom: 18px;
    }

    /* Success Modal */
    .success-content h2 {
        text-align: center;
        padding-right: 0 !important; /* Override padding for center alignment */
        padding-left: 0 !important; /* Ensure full centering */
        font-size: 1.2rem; /* Smaller on small phones */
        margin-bottom: 12px;
    }

    .success-modal .modal-content {
        max-height: 90vh; /* Increased height to fit all content on small phones */
        overflow-y: auto;
        padding: 20px 12px; /* Reduce padding */
    }

    .success-modal .close {
        right: 12px;
        top: 12px;
        width: 32px;
        height: 32px;
        font-size: 1.6rem;
    }

    /* Promise ID Warning - very compact on small phones */
    .success-modal .promise-id-warning {
        padding: 15px;
        margin-bottom: 18px;
    }

    .success-modal .promise-id-warning h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .success-modal .warning-message {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .success-modal .promise-id-code {
        font-size: 1rem;
        padding: 8px;
    }

    .success-modal .continue-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    /* Ad space - very compact on small phones */
    .success-modal .sponsor-space {
        margin: 15px 0;
    }

    .success-modal .sponsor-placeholder {
        padding: 30px 15px;
        font-size: 0.85rem;
    }

    /* Promise ID Warning */
    .promise-id-warning {
        padding: 15px;
    }

    .promise-id-warning h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .promise-id-code {
        font-size: 1.1rem;
        padding: 10px;
    }

    .copy-id-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    /* Empty State */
    .empty-state {
        padding: 40px 15px;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-state h2 {
        font-size: 1.4rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 15px;
        font-size: 0.85rem;
    }

    .footer-links {
        font-size: 0.8rem;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }

    /* Legal Modals on mobile */
    .legal-modal .modal-content {
        max-width: 95%;
        max-height: 90vh;
        padding: 20px;
    }

    .legal-content h2 {
        font-size: 1.3rem;
    }

    .legal-text h3 {
        font-size: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Bigger touch targets */
    .filter-btn,
    .add-promise-btn,
    #searchBtn,
    .refresh-btn,
    .share-promise-btn {
        min-height: 44px; /* Apple's recommended minimum */
    }

    /* Remove hover effects on touch devices */
    .promise-card:hover {
        transform: none;
    }

    /* Tap highlights */
    button,
    .filter-btn,
    .promise-card {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }
}

/* Landscape mode on phones */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
        margin: 2% auto;
    }

    header {
        padding: 15px 0;
    }

    .promise-wall {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
}

/* iPad Pro and tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .promise-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .container {
        max-width: 95%;
    }
}

/* Expired Promise */
.promise-card.expired {
    opacity: 0.85;
    border: 2px solid var(--danger);
    background: linear-gradient(135deg, #fff 0%, #fee2e2 100%);
}

.promise-card.expired::before {
    background: var(--danger);
    height: 6px;
}

.promise-card.expired .progress-fill {
    background: var(--danger);
}

.promise-card.expired .countdown-value {
    color: var(--danger);
}

.promise-card.expired::after {
    content: '⏰ EXPIRED';
    position: absolute;
    top: 20px;
    right: -10px;
    background: var(--danger);
    color: white;
    padding: 8px 25px;
    font-weight: 700;
    font-size: 0.75rem;
    transform: rotate(15deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10;
    letter-spacing: 1px;
}

.promise-card.expired .promise-title {
    color: #991b1b;
}

.promise-card.expired .countdown-item {
    background: #fee2e2;
}

/* Completed Progress */
.promise-card.completed .progress-fill {
    background: var(--success);
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Keyboard focus styles for all interactive elements */
button:focus-visible,
.add-promise-btn:focus-visible,
.filter-btn:focus-visible,
.refresh-btn:focus-visible,
.share-promise-btn:focus-visible,
.submit-btn:focus-visible,
.copy-id-btn:focus-visible,
.continue-btn:focus-visible,
.close:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.2);
}

/* Focus styles for form inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast for links */
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to main content link (for screen readers) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Ensure sufficient color contrast for text */
.promise-description,
.promise-title {
    color: #1f2937; /* Darker for better contrast */
}

/* Focus-visible support (hide default outline, show only on keyboard focus) */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .promise-card,
    button,
    .filter-btn,
    .modal-content {
        transition: none !important;
        animation: none !important;
    }
}

/* ========================================
   STICKY TOP BANNER AD
   ======================================== */

.sticky-top-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sticky-top-banner .container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

/* Placeholder for sticky banner */
.sticky-banner-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: linear-gradient(135deg, #f7f7ff 0%, #fff 100%);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.sticky-banner-placeholder span {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Hide placeholder when ad loads */
.sticky-top-banner .adsbygoogle:not(:empty) + .sticky-banner-placeholder {
    display: none;
}

/* Mobile: smaller banner */
@media (max-width: 768px) {
    .sticky-top-banner .container {
        min-height: 60px;
    }

    .sticky-banner-placeholder {
        width: 320px;
        height: 50px;
    }

    .sticky-banner-placeholder span {
        font-size: 0.8rem;
    }
}

/* ========================================
   HEADER NAVIGATION
   ======================================== */

.logo-link {
    text-decoration: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background: var(--gradient-1);
    color: white;
}

/* ========================================
   NEW SITE FOOTER
   ======================================== */

.site-footer {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px 30px 30px;
    margin-top: 60px;
}

.site-footer .footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand {
    flex: 0 0 auto;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-footer .footer-tagline {
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 8px;
}

.footer-nav {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-nav-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav-column h4 {
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-nav-column a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav-column a:hover,
.footer-nav-column a.active {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-location {
    font-size: 0.85rem;
}

/* ========================================
   STATIC PAGES COMMON STYLES
   ======================================== */

.static-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.static-page main.static-content {
    flex: 1;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 0;
}

.static-content .container {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.page-header .last-updated {
    color: #6b7280;
    font-size: 0.9rem;
}

.page-header .intro {
    color: #4b5563;
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 20px auto 0;
}

/* ========================================
   LEGAL PAGES (Privacy, Terms)
   ======================================== */

.legal-page .toc {
    background: #f9fafb;
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 40px;
}

.legal-page .toc h2 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.legal-page .toc ol {
    columns: 2;
    column-gap: 30px;
    margin: 0;
    padding-left: 20px;
}

.legal-page .toc li {
    margin-bottom: 8px;
    break-inside: avoid;
}

.legal-page .toc a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
}

.legal-page .toc a:hover {
    text-decoration: underline;
}

.legal-page section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f3f4f6;
}

.legal-page section:last-of-type {
    border-bottom: none;
}

.legal-page h2 {
    color: var(--dark);
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-top: 10px;
}

.legal-page h3 {
    color: #374151;
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.legal-page p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 15px;
}

.legal-page ul {
    margin: 15px 0 15px 25px;
    color: #4b5563;
}

.legal-page li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.legal-page strong {
    color: var(--dark);
}

.legal-page a {
    color: var(--primary);
}

/* Cookie Table */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-table th {
    background: #f9fafb;
    color: var(--dark);
    font-weight: 600;
}

.cookie-table tr:hover {
    background: #f9fafb;
}

/* Contact Box */
.contact-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 25px 30px;
    margin-top: 30px;
}

.contact-box h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.contact-box p {
    margin-bottom: 10px;
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-page .about-hero {
    padding-bottom: 40px;
}

.about-page .hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 20px;
}

.about-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.about-section:last-of-type {
    border-bottom: none;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.about-section h2 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-section .lead-text {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 500;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: #f9fafb;
    border-radius: 15px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.value-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 25px;
    transition: border-color 0.3s ease;
}

.value-card:hover {
    border-color: var(--primary);
}

.value-card h3 {
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 12px;
}

.value-card p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--gradient-1);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    color: white;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-desc {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Science List */
.science-list {
    margin: 20px 0 0 25px;
}

.science-list li {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #4b5563;
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.use-case {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
}

.use-case h3 {
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 10px;
}

.use-case p {
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 40px !important;
    border: none !important;
}

.cta-section h2 {
    margin-bottom: 15px;
}

.cta-section p {
    max-width: 500px;
    margin: 0 auto 25px;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Contact Section */
.contact-section .contact-info {
    background: #f9fafb;
    border-radius: 15px;
    padding: 25px 30px;
    margin-top: 20px;
}

.contact-section .contact-info p {
    margin-bottom: 10px;
}

.contact-section .contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.contact-section .contact-info a:hover {
    text-decoration: underline;
}

/* ========================================
   HOW TO PAGE
   ======================================== */

.howto-page .intro-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.intro-section h2 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.intro-section p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
}

.quick-steps {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-step {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark);
}

.step-number {
    background: var(--gradient-1);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Step Sections */
.step-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.step-section:last-of-type {
    border-bottom: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.step-badge {
    background: var(--gradient-1);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-header h2 {
    color: var(--dark);
    font-size: 1.6rem;
    margin: 0;
}

.step-content p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Sub-steps */
.sub-steps {
    margin: 25px 0;
}

.sub-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.sub-step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sub-step h3 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.sub-step p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
}

.example-box h4 {
    color: #92400e;
    font-size: 1rem;
    margin-bottom: 10px;
}

.example-box p {
    color: #78350f;
    margin: 0;
    font-size: 0.95rem;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-box p {
    color: #065f46;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tip-box strong {
    color: #047857;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
}

.category-item .cat-icon {
    font-size: 1.5rem;
}

.category-item span {
    font-weight: 500;
    color: var(--dark);
}

/* Deadline Tips */
.deadline-tips {
    margin: 20px 0;
}

.deadline-tips li {
    margin-bottom: 12px;
    padding-left: 10px;
    color: #4b5563;
    line-height: 1.6;
}

/* Countdown Demo */
.countdown-demo {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
    max-width: 400px;
}

.countdown-demo .countdown-item {
    background: var(--gradient-1);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.countdown-demo .countdown-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.countdown-demo .countdown-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.9;
    margin-top: 5px;
    color: white;
}

/* Color Meanings */
.color-meanings {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f9fafb;
    border-radius: 25px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.color-dot.green { background: var(--success); }
.color-dot.yellow { background: var(--warning); }
.color-dot.red { background: var(--danger); }

.color-item span {
    font-size: 0.9rem;
    color: var(--dark);
}

/* Share Options */
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.share-option {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.share-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.share-option h3 {
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 5px;
}

.share-option p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Filter Buttons Display */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.filter-buttons .filter-btn {
    background: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark);
}

.filter-buttons .filter-btn.demo-active {
    background: var(--gradient-1);
    color: white;
}

/* Troubleshooting Section */
.troubleshooting-section {
    background: #fef2f2;
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
}

.troubleshooting-section h2 {
    color: #991b1b;
    margin-bottom: 25px;
}

.trouble-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.trouble-item:last-child {
    margin-bottom: 0;
}

.trouble-item h3 {
    color: #991b1b;
    font-size: 1rem;
    margin-bottom: 10px;
}

.trouble-item p {
    color: #4b5563;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   FAQ PAGE
   ======================================== */

.faq-page .faq-intro {
    text-align: center;
    margin-bottom: 40px;
}

.faq-page .faq-intro p {
    color: #4b5563;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.faq-categories {
    margin-bottom: 40px;
}

.faq-category {
    margin-bottom: 35px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.category-icon {
    font-size: 1.8rem;
}

.category-header h2 {
    color: var(--dark);
    font-size: 1.4rem;
    margin: 0;
}

/* FAQ Items */
.faq-item {
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-question .icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item.active .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.faq-answer ul {
    margin: 10px 0 0 20px;
    color: #4b5563;
}

.faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.faq-answer a {
    color: var(--primary);
}

/* Contact Options */
.contact-options {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 50px;
}

.contact-options h2 {
    color: var(--dark);
    margin-bottom: 15px;
}

.contact-options > p {
    color: #4b5563;
    margin-bottom: 30px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 35px;
    background: white;
    border-radius: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-method .method-icon {
    font-size: 2rem;
}

.contact-method span {
    color: var(--dark);
    font-weight: 600;
}

.contact-method small {
    color: #6b7280;
    font-size: 0.85rem;
}

/* ========================================
   RESPONSIVE STYLES FOR STATIC PAGES
   ======================================== */

@media (max-width: 768px) {
    /* Header Nav */
    .header-nav {
        gap: 5px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* Footer */
    .site-footer {
        padding: 40px 20px 25px;
    }

    .site-footer .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        flex: none;
    }

    .footer-nav {
        justify-content: center;
        gap: 40px;
    }

    .footer-nav-column {
        align-items: center;
    }

    /* Static Pages */
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .intro {
        font-size: 1rem;
    }

    /* Legal Pages */
    .legal-page .toc ol {
        columns: 1;
    }

    /* About Page */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    /* How To Page */
    .quick-steps {
        flex-direction: column;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown-demo {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-options {
        grid-template-columns: 1fr;
    }

    /* FAQ Page */
    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .contact-method {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    /* Header Nav - Stack on very small screens */
    header .container {
        flex-direction: column;
        text-align: center;
    }

    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    /* Footer */
    .footer-nav {
        flex-direction: column;
        gap: 25px;
    }

    /* Static Pages */
    .page-header h1 {
        font-size: 1.7rem;
    }

    .about-section h2,
    .step-header h2 {
        font-size: 1.3rem;
    }

    .section-icon {
        font-size: 2rem;
    }

    /* About Page */
    .values-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* How To Page */
    .step-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .countdown-demo {
        max-width: 100%;
    }

    /* FAQ Page */
    .faq-question {
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    .category-header h2 {
        font-size: 1.2rem;
    }

    .contact-options {
        padding: 30px 20px;
    }
}
