/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #4ECDC4;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --text-color: #333;
    --text-light: #666;
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* User Flag Banner */
.user-flag {
    position: absolute;
    top: calc(100% + 16px);
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 999;
    white-space: nowrap;
    animation: slideDown 0.3s ease;
    margin-top: 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-flag:hover {
    background: var(--primary-color-dark, #d32f2f);
}

.user-flag-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.user-flag.active .user-flag-chevron {
    transform: rotate(180deg);
}

.user-flag-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

.user-flag-dropdown.show {
    display: block;
}

.user-flag-dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border: none;
    width: 100%;
    text-align: left;
    background: none;
    cursor: pointer;
}

.user-flag-dropdown-item:hover {
    background-color: #f5f5f5;
}

.user-flag-dropdown-item.sign-out {
    color: #d32f2f;
    border-top: 1px solid #eee;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

#navLoginItem {
    display: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    min-width: 190px;
    background: #000;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.store-button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-button-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.store-button-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.store-button.google {
    background: #1a73e8;
}


.store-button.disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.hero-image {
    text-align: center;
}

.screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.video-wrapper {
    position: relative;
    display: inline-block;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2;
}

.video-play-button[hidden] {
    display: none !important;
}

.video-play-button span {
    width: 0;
    height: 0;
    border-left: 22px solid #fff;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    margin-left: 5px;
}

.video-play-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.screenshot video {
    width: 100%;
    max-width: 100%;
    height: 480px;
    max-height: 480px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: block;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background: var(--white);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.step p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Download Section */
.download {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    text-align: center;
}

.download-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Page Styles (Privacy, Terms, Contact) */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 20px;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.page-content h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.page-content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.page-content ul,
.page-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.admin-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .store-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .store-button {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .store-button-text {
        align-items: center;
    }
}

/* Video Transcript Section */
.transcript-content {
    margin-top: 2rem;
    font-size: 1.25rem;
    line-height: 2;
    color: var(--text-color);
    text-align: center;
    position: relative;
    padding: 1.5rem 0;
}

.transcript-segment {
    display: inline;
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: normal;
}

.transcript-segment.active {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(255, 107, 53, 0.8),
        0 0 20px rgba(255, 107, 53, 0.6),
        0 0 30px rgba(255, 107, 53, 0.4),
        0 0 40px rgba(255, 107, 53, 0.2);
    background: rgba(255, 107, 53, 0.15);
    box-shadow: 
        0 0 15px rgba(255, 107, 53, 0.4),
        inset 0 0 15px rgba(255, 107, 53, 0.1);
    transform: scale(1.02);
}

.transcript-segment:not(.active) {
    opacity: 0.6;
}

/* When video is paused/stopped, all segments should glow */
.transcript-content.idle .transcript-segment,
.transcript-content.paused .transcript-segment {
    color: #ffffff;
    font-weight: bold;
    opacity: 1;
    text-shadow: 
        0 0 10px rgba(255, 107, 53, 0.6),
        0 0 20px rgba(255, 107, 53, 0.4),
        0 0 30px rgba(255, 107, 53, 0.3);
    background: rgba(255, 107, 53, 0.1);
    box-shadow: 
        0 0 10px rgba(255, 107, 53, 0.3),
        inset 0 0 10px rgba(255, 107, 53, 0.1);
}

/* When playing, only active segment glows */
.transcript-content.playing .transcript-segment:not(.active) {
    opacity: 0.6;
    color: var(--text-color);
    font-weight: normal;
    text-shadow: none;
    background: transparent;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .transcript-content {
        font-size: 1rem;
        line-height: 1.8;
        padding: 1rem 0;
    }
    
    .transcript-segment {
        display: block;
        margin: 0.5rem 0;
        padding: 0.75rem;
    }
}

