/* CSS Variables */
:root {
    --primary-blue: #3B82F6;
    --secondary-blue: #60A5FA;
    --light-blue: #DBEAFE;
    --charcoal: #374151;
    --light-gray: #F9FAFB;
    --medium-gray: #6B7280;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-light: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--light-gray);
    color: var(--charcoal);
    line-height: 1.6;
    font-size: 16px;
}

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

/* Header */
.sticky-header {
    position: static;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.logo-section {
    display: flex;
    justify-content: center;
    padding: 15px 0 10px;
    background-color: white;
    box-shadow: 1px 2px 15px rgba(0, 0, 0, 0.16);
    width: 100%
}

.ezily-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    max-height: 120px;
    width: 100px;
}

.header-content {
    text-align: center;
    padding: 40px 0 20px;
}

.main-headline {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sub-headline {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 400;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Countdown Timer */
.countdown-section {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.countdown-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.time-unit {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 80px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-unit .number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.time-unit .label {
    font-size: 14px;
    opacity: 0.8;
}

.deadline-text {
    opacity: 0.8;
    font-size: 14px;
}

/* Live Counter */
.live-counter {
    padding: 20px 0 30px;
    text-align: center;
}

.counter-text {
    font-size: 18px;
    font-weight: 500;
}

.highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.remaining {
    color: #FDE68A;
    font-weight: 700;
}

/* Main Content Sections */
section {
    padding: 80px 0;
}

section h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--charcoal);
}

/* Mini App Introduction Section */
.mini-app-intro-section {
    background: var(--white);
    padding: 60px 0;
}

.mini-app-intro-section h2 {
    margin-bottom: 30px;
    color: var(--charcoal);
}

.intro-description {
    font-size: clamp(16px, 2.5vw, 18px);
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--medium-gray);
    font-weight: 400;
}

/* Benefits Section */
.benefits-section {
    background: var(--white);
}

.benefits-list {
    display: grid;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    font-size: 32px;
    background: var(--light-blue);
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.benefit-content p {
    color: var(--medium-gray);
    line-height: 1.7;
}

/* Use Cases Section */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.use-case-card {
    background: var(--white);
    padding: 30px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E5E7EB;
}

.use-case-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.use-case-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.use-case-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.use-case-card p {
    color: var(--medium-gray);
    line-height: 1.6;
    font-size: 14px;
}

.use-case-card.special-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    border-color: var(--primary-blue);
}

.use-case-card.special-card h3,
.use-case-card.special-card p {
    color: var(--white);
}

.use-case-card.special-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Success Story Section */
.success-story-section {
    background: var(--white);
}

.story-card {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.story-header h3 {
    font-size: 24px;
    font-weight: 600;
}

.story-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.story-description {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.95;
}

.story-quote blockquote {
    font-style: italic;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    padding-left: 20px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.story-quote cite {
    font-size: 14px;
    opacity: 0.8;
}

/* How To Section */
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
}

.step-item {
    text-align: center;
    flex: 1;
    min-width: 220px;
    background: var(--white);
    padding: 40px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    align-self: stretch;
}

.step-item:hover {
    transform: translateY(-4px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.step-content p {
    color: var(--medium-gray);
    line-height: 1.6;
}

.step-arrow {
    font-size: 24px;
    color: var(--primary-blue);
    font-weight: bold;
}

/* Application Section */
.application-section {
    background: var(--white);
}

.application-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #E5E7EB;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--charcoal);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.submit-btn {
    width: 100%;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.popup-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--charcoal);
}

.popup-content p {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

.popup-close-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.popup-close-btn:hover {
    background: #2563EB;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .story-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .story-stats {
        justify-content: flex-start;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .countdown-timer {
        gap: 15px;
    }
    
    .time-unit {
        min-width: 70px;
        padding: 12px 16px;
    }
    
    .time-unit .number {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .application-form {
        padding: 30px 20px;
    }
    
    .story-card {
        padding: 30px 24px;
    }
    
    .step-item {
        padding: 30px 20px;
    }
}

/* Footer Styles */
.site-footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-copyright {
    font-size: 14px;
    opacity: 0.8;
}

.footer-copyright p {
    margin: 0;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading State for Form */
.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness for Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}
