/* ============================================
   RESET AND BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ============================================
   BRAND COLORS & VARIABLES (Reusable)
   ============================================ */
:root {
    --brand-green: rgb(30, 201, 109);
    --tranparent-green: rgba(30, 201, 109, 0.5);
    --white: #ffffff;
    --text-dark: #333333;
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --light-gray: rgba(230, 235, 245, 0.8);
    --border-radius: 20px;
    --container-padding: 3%;
}

/* ============================================
   HEADER COMPONENT (Reusable)
   ============================================ */
.main-header {
    position: relative;
    z-index: 1000;
}

.header-content {
    background: var(--white);
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-direction: column;
    gap: 0;
}

/* LOGO COMPONENT (Reusable) */
.logo h1 {
    font-family: 'Arvo', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--brand-green);
    letter-spacing: 2px;
    text-align: center;
}

/* NAVIGATION COMPONENT (Reusable) */
.navigation {
    background: var(--brand-green);
    padding: 15px var(--container-padding);
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
}

.nav-links-left {
    display: flex;
    align-items: center;
    gap: 40px; /* Original gap between main links */
}

.nav-item {
    font-family: 'Arvo', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    cursor: pointer;
    opacity: 0.7;
    position: relative;
    text-decoration: none;
}

.nav-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.nav-item-active {
    opacity: 1;
    color: var(--white);
}

.nav-item-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
}

/* --- NEW: Style for the auth link --- */
.auth-link {
    font-weight: 700;
    opacity: 0.9;
}
.auth-link:hover {
    opacity: 1;
}

/* ============================================
   HERO SECTION COMPONENT (Reusable)
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    padding: 0 ; /* 5% border on each side */
}

.hero-container {
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
    background-color: #333;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 var(--container-padding);
}

/* ============================================
   NAVIGATION ARROWS COMPONENT (Reusable)
   ============================================ */
.nav-arrow {
    position: absolute;
    bottom: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
    color: white;
}

.nav-arrow-left {
    left: var(--container-padding);
}

.nav-arrow-right {
    right: var(--container-padding);
}

/* ============================================
   HERO TEXT COMPONENT (Reusable)
   ============================================ */
.hero-text-content {
    max-width: 1000px;
    color: var(--white);
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--white);
    transition: opacity 0.3s ease;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    transition: opacity 0.3s ease;
}

.replies-count {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-green);
    transition: opacity 0.3s ease;
}

/* PLAY BUTTON CONTAINER (now within hero-text-content) */
.play-button-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
    max-width: 650px; /* Same as subtitle max-width */
}

/* REPLIES INFO COMPONENT (Reusable) */
.replies-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    color: var(--brand-green);
    max-width: 650px; /* Same as subtitle max-width */
    margin-left: 20px;
}

.replies-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--brand-green);
}

/* ============================================
   PLAY BUTTON COMPONENT (Reusable)
   ============================================ */

.play-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--brand-green);
    border: 4px solid var(--white);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    background: var(--white);
    color: var(--brand-green);
}

.play-button:active {
    transform: scale(0.95);
}

.play-icon {
    width: 100px;
    height: 100px;
    color: var(--white);
    margin-left: 4px; /* Slight offset to center the triangle visually */
}

.play-button:hover .play-icon {
    color: var(--brand-green);
}

/* ============================================
   CREATE CONVERSATION SECTION (Reusable)
   ============================================ */
.create-conversation-section {
    background: var(--white);
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}

.create-conversation-container {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    /* Initial state - hidden and positioned down */
    opacity: 0;
    transform: translateY(50px);
    transition: all 2.5s ease-out;
}

/* Animation class added by Intersection Observer */
.create-conversation-container.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.create-conversation-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* ADD BUTTON COMPONENT (Reusable) */
.add-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--brand-green);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(30, 201, 109, 0.3);
    margin: 0 auto;
}

.add-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(30, 201, 109, 0.4);
    background: var(--text-dark);
}

.add-button:active {
    transform: scale(0.95);
}

.add-icon {
    font-size: 3rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1;
    user-select: none;
}

.add-button:hover .add-icon {
    color: var(--white);
}

/* ============================================
   ANIMATION UTILITIES (Reusable)
   ============================================ */
.fade-in-up {
    animation: fadeInUp 2.5s ease-out;
}

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

.fade-in-down {
    animation: fadeInDown 2.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS (Mobile-First)
   ============================================ */

/* Tablet Styles */
@media (max-width: 1024px) {
    :root {
        --container-padding: 8%;
    }
    
    .header-content {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --container-padding: 6%;
    }
    
    .header-content {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .navigation {
        gap: 20px;
        padding: 12px var(--container-padding);
        flex-wrap: wrap;
        justify-content: center; /* This will center the left/right groups */
        position: relative;
        top: 0;
        margin-top: 10px;
        padding: 10px 0;
    }

    .nav-links-left {
        display: flex;
        flex-wrap: wrap; /* Allow main links to wrap */
        justify-content: center;
        gap: 20px; /* Match parent's mobile gap */
    }
    
    .nav-item {
        font-size: 1.4rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .navigation {
        position: relative;
        top: 0;
        margin-top: 10px;
        padding: 10px 0;
    }
    
    .nav-item {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-section {
        padding: 0 3%; /* Reduced border on mobile */
    }
    
    .hero-content {
        justify-content: flex-start;
        text-align: left;
        padding: 0 var(--container-padding);
    }
    
    .hero-text-content {
        text-align: left;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .play-button-container {
        justify-content: flex-start;
    }
    
    .play-button {
        width: 120px;
        height: 120px;
    }
    
    .play-icon {
        width: 60px;
        height: 60px;
    }
    
    .replies-info {
        justify-content: flex-start;
    }
    
    .replies-count {
        font-size: 1.8rem;
    }
    
    .replies-text {
        font-size: 1.3rem;
    }
    
    /* Navigation Arrows - Mobile */
    .nav-arrow {
        width: 50px;
        height: 50px;
        bottom: 30px;
    }
    
    .nav-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-arrow-left {
        left: var(--container-padding);
    }
    
    .nav-arrow-right {
        right: var(--container-padding);
    }
    
    /* Create Conversation Section - Mobile */
    .create-conversation-section {
        padding: 60px 20px;
        min-height: 30vh;
    }
    
    .create-conversation-container {
        /* Adjust animation distance for mobile */
        transform: translateY(30px);
    }
    
    .create-conversation-container.animate-in {
        transform: translateY(0);
    }
    
    .create-conversation-title {
        font-size: 2rem;
        margin-bottom: 30px;
        line-height: 1.4;
    }
    
    .add-button {
        width: 60px;
        height: 60px;
    }
    
    .add-icon {
        font-size: 2rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    :root {
        --container-padding: 5%;
    }
    
    .logo h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
        text-align: center;
    }
    
    .navigation {
        gap: 15px;
        padding: 10px var(--container-padding);
        justify-content: center;
    }

    .nav-links-left {
        gap: 15px; /* Match parent */
    }
    
    .nav-item {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 0 2%;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .play-button {
        width: 80px;
        height: 80px;
    }
    
    .play-icon {
        width: 40px;
        height: 40px;
    }
    
    .replies-count {
        font-size: 1.5rem;
    }
    
    .replies-text {
        font-size: 1.1rem;
    }
    
    /* Navigation Arrows - Small Mobile */
    .nav-arrow {
        width: 40px;
        height: 40px;
        bottom: 20px;
    }
    
    .nav-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-arrow-left {
        left: var(--container-padding);
    }
    
    .nav-arrow-right {
        right: var(--container-padding);
    }
    
    /* Create Conversation Section - Small Mobile */
    .create-conversation-section {
        padding: 40px 15px;
        min-height: 25vh;
    }
    
    .create-conversation-container {
        /* Smaller animation distance for small mobile */
        transform: translateY(20px);
    }
    
    .create-conversation-container.animate-in {
        transform: translateY(0);
    }
    
    .create-conversation-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
        line-height: 1.4;
        letter-spacing: -0.3px;
    }
    
    .add-button {
        width: 50px;
        height: 50px;
    }
    
    .add-icon {
        font-size: 1.8rem;
    }
}

#recordingControls, #audioPlaybackContainer {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#timer {
    font-family: monospace;
    font-size: 1.2em;
}

#audioPlaybackContainer audio {
    width: 100%;
}

/* ============================================
    MODAL OVERLAY
========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

/* ============================================
    MODAL CONTENT
    ============================================ */
.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-inner {
    padding: 50px 40px;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--brand-green);
    color: var(--white);
    transform: rotate(90deg);
}

/* Logo */
.modal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.modal-logo h1 {
    font-family: 'Arvo', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-green);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.modal-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
}

/* Tab Switcher */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 12px;
}

.modal-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-tab.active {
    background: var(--white);
    color: var(--brand-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form Container */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Welcome Text */
.welcome-text {
    text-align: center;
    margin-bottom: 25px;
}

.welcome-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.welcome-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #666;
}

/* Form Styles */
.auth-form {
    margin-bottom: 20px;
}

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

.form-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 201, 109, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Password Toggle */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;

    /* --- NEW STYLES --- */
    width: 20px;  /* Set a fixed width */
    height: 20px; /* Set a fixed height */
    font-size: 0; /* Hide any accidental text/emoji */
    opacity: 0.6; /* Slightly fade the icon */
    background-repeat: no-repeat;
    background-position: center;
    /* Default "show" icon (eye) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
}

.password-toggle:hover {
    color: var(--brand-green);
    opacity: 1;
}

.password-toggle.is-visible {
    /* "Hide" icon (eye-slashed) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'%3E%3C/path%3E%3Cline x1='1' y1='1' x2='23' y2='23'%3E%3C/line%3E%3C/svg%3E");
}

/* Remember & Forgot */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand-green);
}

.remember-me label {
    cursor: pointer;
    color: #666;
}

.forgot-password {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 14px;
    background: var(--brand-green);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 201, 109, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 201, 109, 0.4);
    background: rgb(25, 180, 95);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #999;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 12px;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-button {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-button:hover {
    border-color: var(--brand-green);
    background: var(--transparent-green);
    transform: translateY(-2px);
}

.social-button:active {
    transform: translateY(0);
}

.social-icon {
    font-size: 1.2rem;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.nav-links-right {
    display: flex;
    align-items: center;
    gap: 40px; /* Match the left side */
}

/* Style adjustments for create post modal */
#createPostModal .modal-inner {
    padding: 40px 30px; /* Slightly less padding than auth modal */
}
#createPostModal .form-group {
    margin-bottom: 20px;
}

/* --- NEW RECORDING UI STYLES --- */
#createPostModal .recording-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px 0 20px;
}

/* Recording State */
#createPostModal .recording-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
#createPostModal .record-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #FF5722);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    position: relative;
}
#createPostModal .record-btn:hover {
    transform: scale(1.05);
}
#createPostModal .record-btn.recording {
    background: linear-gradient(135deg, #FF4444, #CC1111);
    animation: recordingPulse 1.5s ease-in-out infinite;
}
#createPostModal .record-btn svg {
    width: 28px;
    height: 28px;
    color: white;
}
#createPostModal .record-instruction {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}
#createPostModal .recording-timer {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--brand-green);
    font-weight: 600;
}

/* Playback State */
#createPostModal .playback-state {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}
#createPostModal .playback-state audio {
    width: 100%;
    height: 40px;
}
#createPostModal .playback-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}
#createPostModal .playback-action-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid var(--brand-green);
    background: transparent;
    color: var(--brand-green);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
#createPostModal .playback-action-btn:hover {
    background: var(--brand-green);
    color: white;
}
#createPostModal .playback-action-btn.delete-btn {
    border-color: #F44336;
    color: #F44336;
}
#createPostModal .playback-action-btn.delete-btn:hover {
    background: #F44336;
    color: white;
}

#createPostModal #status {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 1.2em; /* Prevent layout shift */
    text-align: center;
}
#createPostModal .hidden {
    display: none;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    /* Prevents layout shift when text becomes bold */
    height: 1.2em; 
}

.char-counter.limit-reached {
    color: #F44336; /* A red color from your stylesheet */
    font-weight: 600;
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 1.2em;
    padding-right: 40px; /* Make space for the arrow */
    cursor: pointer;
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ============================================
    RESPONSIVE BREAKPOINTS
    ============================================ */
@media (max-width: 768px) {
    .modal-inner {
        padding: 40px 30px;
    }

    .modal-logo h1 {
        font-size: 2.5rem;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .demo-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-height: 95vh;
    }

    .modal-inner {
        padding: 35px 25px;
    }

    .modal-logo h1 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

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

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .social-button {
        font-size: 0.9rem;
        padding: 11px;
    }

    .demo-buttons {
        flex-direction: column;
    }

    .demo-button {
        width: 100%;
    }
}