/* ===================================
   ORDYNAIRE - Pages
   Main Page Content (Entrance, AI Hub, App)
   Mobile-First with Desktop Responsiveness
   =================================== */
#entrancePage .entrance-container {
    position: relative;
    height: 100vh;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    #entrancePage .entrance-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 60px;
        gap: 40px; /* Add gap between elements */
    }
}

@media (min-width: 1440px) {
    #entrancePage .entrance-container {
        max-width: 1600px;
        padding: 0 80px;
        gap: 50px;
    }
}

#entrancePage .brand-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

@media (min-width: 1024px) {
    #entrancePage .brand-identity {
        margin-bottom: 0; /* Remove margin, use gap instead */
    }
}

@media (min-width: 1440px) {
    #entrancePage .brand-identity {
        margin-bottom: 0;
    }
}
#entrancePage .symbol-container {
    position: relative;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    margin-bottom: 35px;
}

/* Mobile: active state */
#entrancePage .symbol-container:active {
    transform: scale(1.1) translateY(-5px);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    #entrancePage .symbol-container {
        margin-bottom: 60px;
    }
    
    #entrancePage .symbol-container:hover {
        transform: scale(1.08) translateY(-10px);
    }
    
    #entrancePage .symbol-container:active {
        transform: scale(1.05) translateY(-5px);
    }
}

#entrancePage .glow-ring {
    position: absolute;
    border: 1px solid var(--glow-ring);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.18), 
                inset 0 0 25px rgba(255, 255, 255, 0.06);
}

#entrancePage .ring-1 {
    width: 180px;
    height: 180px;
    animation: pulse-ring 5s ease-in-out infinite;
}

#entrancePage .ring-2 {
    width: 220px;
    height: 220px;
    animation: pulse-ring 5s ease-in-out infinite 1.5s;
}

#entrancePage .ring-3 {
    width: 260px;
    height: 260px;
    animation: pulse-ring 5s ease-in-out infinite 3s;
}

@media (min-width: 1024px) {
    #entrancePage .ring-1 {
        width: 260px;
        height: 260px;
    }
    
    #entrancePage .ring-2 {
        width: 320px;
        height: 320px;
    }
    
    #entrancePage .ring-3 {
        width: 380px;
        height: 380px;
    }
}

@media (min-width: 1440px) {
    #entrancePage .ring-1 {
        width: 300px;
        height: 300px;
    }
    
    #entrancePage .ring-2 {
        width: 370px;
        height: 370px;
    }
    
    #entrancePage .ring-3 {
        width: 440px;
        height: 440px;
    }
}

#entrancePage .symbol-circle {
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 30% 30%, var(--glow-soft) 0%, transparent 60%),
                radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    position: relative;
    animation: symbol-pulse 4s ease-in-out infinite;
    box-shadow: 0 0 45px rgba(255, 255, 255, 0.15),
                inset 0 0 35px rgba(255, 255, 255, 0.07),
                0 0 80px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
}

@media (min-width: 1024px) {
    #entrancePage .symbol-circle {
        width: 260px;
        height: 260px;
        border: 3px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 60px rgba(255, 255, 255, 0.2),
                    inset 0 0 50px rgba(255, 255, 255, 0.1),
                    0 0 120px rgba(255, 255, 255, 0.15);
    }
}

@media (min-width: 1440px) {
    #entrancePage .symbol-circle {
        width: 300px;
        height: 300px;
    }
}

#entrancePage .symbol {
    position: relative;
    width: 100px;
    height: 100px;
}

@media (min-width: 1024px) {
    #entrancePage .symbol {
        width: 145px;
        height: 145px;
    }
}

@media (min-width: 1440px) {
    #entrancePage .symbol {
        width: 165px;
        height: 165px;
    }
}

#entrancePage .fingerprint-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 155px;
    height: 155px;
}

@media (min-width: 1024px) {
    #entrancePage .fingerprint-container {
        width: 220px;
        height: 220px;
    }
}

@media (min-width: 1440px) {
    #entrancePage .fingerprint-container {
        width: 250px;
        height: 250px;
    }
}

#entrancePage .fingerprint-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: url('public/thumb.png') center/contain no-repeat;
    filter: brightness(0) invert(1);
    animation: fingerprint-glow 3s ease-in-out infinite alternate;
}

@media (min-width: 1024px) {
    #entrancePage .fingerprint-image {
        width: 215px;
        height: 215px;
    }
}

@media (min-width: 1440px) {
    #entrancePage .fingerprint-image {
        width: 245px;
        height: 245px;
    }
}

#entrancePage .brand-name {
    font-size: 2.5rem;
    font-weight: 200;
    letter-spacing: 0.6rem;
    line-height: 1;
    color: var(--white);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 15px var(--glow-soft);
}

@media (min-width: 768px) {
    #entrancePage .brand-name {
        font-size: 3rem;
        letter-spacing: 0.7rem;
    }
}

@media (min-width: 1024px) {
    #entrancePage .brand-name {
        font-size: 4rem;
        letter-spacing: 0.9rem;
        margin-bottom: 24px;
        text-shadow: 0 0 25px var(--glow-soft);
    }
}

@media (min-width: 1440px) {
    #entrancePage .brand-name {
        font-size: 4.5rem;
        letter-spacing: 1rem;
        margin-bottom: 28px;
    }
}

#entrancePage .subtitle {
    font-size: 0.85rem;
    color: var(--fingerprint-gray);
    letter-spacing: 0.3rem;
    text-align: center;
    font-weight: 200;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    #entrancePage .subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.35rem;
    }
}

@media (min-width: 1024px) {
    #entrancePage .subtitle {
        font-size: 1.15rem;
        letter-spacing: 0.5rem;
    }
}

@media (min-width: 1440px) {
    #entrancePage .subtitle {
        font-size: 1.25rem;
        letter-spacing: 0.55rem;
    }
}

/* Entrance button - just ensure it's visible */
.entrance-nav-button {
    margin-top: 0; /* Changed from 50px */
    padding: 16px 48px;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 1s both;
}


.entrance-nav-button:active {
    background: var(--white);
    color: #000;
    border-color: var(--white);
    transform: translateY(-2px);
}

@media (min-width: 1024px) {
    .entrance-nav-button {
        padding: 20px 60px; /* Larger padding for desktop */
        font-size: 1.05rem;
        letter-spacing: 0.18rem;
    }
    
    .entrance-nav-button:hover {
        background: var(--white);
        color: #000;
        border-color: var(--white);
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    }
    
    .entrance-nav-button:active {
        transform: translateY(-1px);
    }
}

@media (min-width: 1440px) {
    .entrance-nav-button {
        padding: 22px 64px;
        font-size: 1.1rem;
    }
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

@media (min-width: 1024px) {
    .header {
        padding: 25px 60px;
        height: 90px;
    }
}

@media (min-width: 1440px) {
    .header {
        padding: 25px 80px;
        height: 100px;
    }
}

.logo {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.2rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Mobile: active state */
.logo:active {
    color: var(--soft-white);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    .logo {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
    }
    
    .logo:hover {
        color: var(--ai-blue);
        text-shadow: 0 0 20px var(--ai-blue-glow);
        transform: translateY(-1px);
    }
    
    .logo:active {
        color: var(--ai-blue-soft);
    }
}

@media (min-width: 1440px) {
    .logo {
        font-size: 1.6rem;
        letter-spacing: 0.35rem;
    }
}

.menu-button {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    padding: 0;
}

/* Mobile: active state */
.menu-button:active {
    transform: scale(1.1);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    .menu-button {
        top: 25px;
        right: 60px;
        width: 50px;
        height: 50px;
    }
    
    .menu-button:hover {
        transform: scale(1.05);
    }
    
    .menu-button:hover .hamburger span {
        background: var(--ai-blue);
        box-shadow: 0 0 8px var(--ai-blue-glow);
    }
    
    .menu-button:active {
        transform: scale(1.02);
    }
}

@media (min-width: 1440px) {
    .menu-button {
        right: 80px;
    }
}

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

@media (min-width: 1024px) {
    .hamburger {
        gap: 6px;
    }
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .hamburger span {
        width: 28px;
        height: 2.5px;
    }
}

.menu-button.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.menu-button.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-button.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

@media (min-width: 1024px) {
    .menu-button.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translateY(9px);
    }
    
    .menu-button.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translateY(-9px);
    }
}

.menu-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    border-left: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    transition: right 0.4s var(--ease-out);
    z-index: 1000;
    padding: 80px 30px 30px;
}

@media (min-width: 768px) {
    .menu-panel {
        width: 320px;
        right: -320px;
        padding: 100px 40px 40px;
    }
}

@media (min-width: 1024px) {
    .menu-panel {
        width: 400px;
        right: -400px;
        padding: 120px 50px 50px;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
    }
}

.menu-panel.open {
    right: 0;
}

.menu-nav {
    list-style: none;
    min-height: 0;
}

.menu-nav li {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .menu-nav li {
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .menu-nav li {
        margin-bottom: 28px;
    }
}

.menu-nav a {
    color: var(--soft-white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    cursor: pointer;
}

@media (min-width: 768px) {
    .menu-nav a {
        font-size: 1.2rem;
        padding: 12px 0;
    }
}

@media (min-width: 1024px) {
    .menu-nav a {
        font-size: 1.3rem;
        padding: 14px 0;
        letter-spacing: 0.12rem;
    }
}

/* Mobile: active state */
.menu-nav a:active {
    color: var(--white);
    border-bottom-color: var(--border-subtle);
    transform: translateX(10px);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    .menu-nav a:hover {
        color: var(--white);
        border-bottom-color: var(--ai-blue);
        transform: translateX(12px);
    }
    
    .menu-nav a:active {
        color: var(--ai-blue);
    }
}

.menu-user-section {
    margin-top: 40px;
}

@media (min-width: 1024px) {
    .menu-user-section {
        margin-top: 50px;
    }
}

.menu-divider {
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 20px;
}

@media (min-width: 1024px) {
    .menu-divider {
        margin-bottom: 24px;
    }
}

.menu-user-email {
    font-size: 0.85rem;
    color: var(--soft-white);
    letter-spacing: 0.02rem;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .menu-user-email {
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .menu-user-email {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
}

.menu-logout-button {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--soft-white);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .menu-logout-button {
        padding: 14px;
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .menu-logout-button {
        padding: 16px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
}

/* Mobile: active state */
.menu-logout-button:active {
    background: var(--glow-soft);
    border-color: var(--soft-white);
    color: var(--white);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    .menu-logout-button:hover {
        background: var(--glow-soft);
        border-color: var(--ai-blue);
        color: var(--white);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 163, 255, 0.2);
    }
    
    .menu-logout-button:active {
        background: rgba(255, 255, 255, 0.12);
        transform: translateY(0);
    }
}

.menu-access-trigger {
    cursor: pointer;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1024px) {
    .menu-overlay.open {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Division Cards */
.division-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 90px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .division-container {
        padding: 60px;
        padding-top: 110px;
    }
}

@media (min-width: 1440px) {
    .division-container {
        padding: 80px;
        padding-top: 120px;
    }
}

.division-card {
    padding: 25px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 550px;
    text-align: left;
    margin: 0 auto 30px;
    box-shadow: var(--shadow-md);
    height: auto;
    min-height: 450px;
}

@media (min-width: 768px) {
    .division-card {
        padding: 30px;
        max-width: 650px;
        min-height: 500px;
        margin-bottom: 35px;
    }
}

@media (min-width: 1024px) {
    .division-card {
        padding: 40px;
        max-width: 700px;
        min-height: 520px;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
        margin-bottom: 40px;
    }
}

@media (min-width: 1440px) {
    .division-card {
        max-width: 800px;
        padding: 45px;
        min-height: 560px;
    }
}

/* AI Hub Navigation Button */
.aihub-nav-button {
    padding: 16px 48px;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aihub-nav-button:active {
    background: var(--white);
    color: #000;
    border-color: var(--white);
    transform: translateY(-2px);
}

@media (min-width: 1024px) {
    .aihub-nav-button {
        padding: 18px 56px;
        font-size: 1rem;
    }
    
    .aihub-nav-button:hover {
        background: var(--white);
        color: #000;
        border-color: var(--white);
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    }
    
    .aihub-nav-button:active {
        transform: translateY(-1px);
    }
}

.division-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--glow-soft) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Remove old hover effects since card is no longer clickable */

.division-image {
    width: 100%;
    height: 160px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    margin-bottom: 25px;
    position: relative;
    overflow: visible;
    padding: 10px;
}

@media (min-width: 768px) {
    .division-image {
        height: 180px;
        margin-bottom: 30px;
    }
}

@media (min-width: 1024px) {
    .division-image {
        height: 180px;
        margin-bottom: 30px;
        border-radius: 12px;
    }
}

@media (min-width: 1440px) {
    .division-image {
        height: 200px;
        margin-bottom: 32px;
    }
}

.division-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.division-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 0.2rem;
    position: relative;
    z-index: 2;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (min-width: 768px) {
    .division-title {
        font-size: 2rem;
        margin-bottom: 20px;
        letter-spacing: 0.25rem;
    }
}

@media (min-width: 1024px) {
    .division-title {
        font-size: 2.2rem;
        margin-bottom: 22px;
        letter-spacing: 0.28rem;
    }
}

@media (min-width: 1440px) {
    .division-title {
        font-size: 2.4rem;
        margin-bottom: 24px;
        letter-spacing: 0.3rem;
    }
}

.division-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--soft-white);
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .division-description {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (min-width: 1024px) {
    .division-description {
        font-size: 1.05rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.8);
    }
}

@media (min-width: 1440px) {
    .division-description {
        font-size: 1.08rem;
        line-height: 1.8;
    }
}

/* Neural Network Animation */
#aihubPage .neural-network {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

#aihubPage .neuron {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, var(--ai-blue) 0%, transparent 80%);
    border-radius: 50%;
    opacity: 0.4;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 0 3px var(--ai-blue-glow);
}

@media (min-width: 1024px) {
    #aihubPage .neuron {
        width: 8px;
        height: 8px;
        box-shadow: 0 0 5px var(--ai-blue-glow);
    }
}

#aihubPage .neuron.active {
    opacity: 1;
    width: 12px;
    height: 12px;
    box-shadow: 0 0 20px var(--ai-blue), 0 0 40px var(--ai-blue-glow);
    animation: neuron-fire 0.5s ease-out;
}

@media (min-width: 1024px) {
    #aihubPage .neuron.active {
        width: 16px;
        height: 16px;
        box-shadow: 0 0 30px var(--ai-blue), 0 0 50px var(--ai-blue-glow);
    }
}

#aihubPage .neural-connection {
    position: absolute;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, var(--ai-blue-soft) 50%, transparent 100%);
    opacity: 0;
    transform-origin: 0 50%;
    pointer-events: none;
    animation: connection-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 3px var(--ai-blue-glow);
    z-index: 1;
}

@media (min-width: 1024px) {
    #aihubPage .neural-connection {
        height: 2px;
        box-shadow: 0 0 5px var(--ai-blue-glow);
    }
}

#aihubPage .neural-connection.active {
    opacity: 0.8;
    animation: signal-flow 0.8s ease-out;
    box-shadow: 0 0 10px var(--ai-blue), 0 0 20px var(--ai-blue-glow);
}

/* App Page */
#appPage .header {
    padding: 20px 24px;
    backdrop-filter: blur(16px);
    height: 68px;
}

@media (min-width: 1024px) {
    #appPage .header {
        padding: 25px 60px;
        height: 90px;
    }
}

@media (min-width: 1440px) {
    #appPage .header {
        padding: 25px 80px;
        height: 100px;
    }
}

#appPage .logo {
    font-size: 1.8rem;
    letter-spacing: 0.3rem;
}

@media (min-width: 1024px) {
    #appPage .logo {
        font-size: 2.2rem;
        letter-spacing: 0.4rem;
    }
}

@media (min-width: 1440px) {
    #appPage .logo {
        font-size: 2.4rem;
        letter-spacing: 0.45rem;
    }
}

#appPage .main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-top: 70px;
    padding-bottom: 80px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    #appPage .main-container {
        padding-top: 90px;
        padding-bottom: 100px;
    }
}

@media (min-width: 1440px) {
    #appPage .main-container {
        padding-top: 100px;
        padding-bottom: 110px;
    }
}

#appPage .app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 16px 20px;
    gap: 16px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
    min-height: calc(100vh - 140px);
}

@media (min-width: 1024px) {
    #appPage .app-container {
        max-width: 1400px;
        padding: 32px 60px;
        gap: 24px;
    }
}

@media (min-width: 1440px) {
    #appPage .app-container {
        max-width: 1600px;
        padding: 40px 80px;
        gap: 28px;
    }
}

#appPage .main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 100px 16px;
    position: relative;
    min-height: 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.02);
}

@media (min-width: 1024px) {
    #appPage .main-content-area {
        padding: 32px 32px 120px 32px;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

@media (min-width: 1440px) {
    #appPage .main-content-area {
        padding: 40px 40px 140px 40px;
        border-radius: 20px;
    }
}

#appPage .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

@media (min-width: 1024px) {
    #appPage .section-header {
        margin-bottom: 24px;
    }
}

.app-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--soft-white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

/* Mobile: active state */
.app-button:active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--soft-white);
    color: var(--white);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    .app-button {
        border-radius: 8px;
    }
    
    .app-button:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--ai-blue);
        color: var(--white);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 163, 255, 0.2);
    }
    
    .app-button:active {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(0);
    }
}

#appPage .copy-button {
    padding: 6px 8px;
    font-size: 0.7rem;
}

@media (min-width: 1024px) {
    #appPage .copy-button {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

#appPage .copy-button.success {
    background: rgba(0, 163, 255, 0.1);
    border-color: var(--ai-blue);
    color: var(--ai-blue);
}

#appPage .view-toggles {
    display: flex;
    gap: 8px;
}

@media (min-width: 1024px) {
    #appPage .view-toggles {
        gap: 10px;
    }
}

#appPage .view-toggle {
    padding: 4px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.05rem;
}

@media (min-width: 1024px) {
    #appPage .view-toggle {
        padding: 8px 16px;
        font-size: 0.8rem;
        letter-spacing: 0.08rem;
    }
}

#appPage .view-toggle.active {
    background: var(--white);
    color: #000;
    border-color: var(--white);
}

#appPage .content-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease;
    min-height: 0;
}

#appPage .content-view.hidden {
    opacity: 0;
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    pointer-events: none;
}

#appPage .input-textarea {
    flex: 1;
    width: 100%;
    background: var(--glow-soft);
    color: var(--white);
    font-family: inherit;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    resize: none;
    overflow-y: auto;
    transition: all 0.2s ease;
    line-height: 1.6;
    min-height: 200px;
}

@media (min-width: 1024px) {
    #appPage .input-textarea {
        font-size: 1rem;
        padding: 24px;
        line-height: 1.8;
        border-radius: 12px;
    }
    
    #appPage .input-textarea:hover {
        border-color: rgba(255, 255, 255, 0.2);
    }
}

@media (min-width: 1440px) {
    #appPage .input-textarea {
        font-size: 1.05rem;
        padding: 28px;
    }
}

#appPage .input-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

#appPage .input-textarea:focus {
    border-color: var(--ai-blue);
    box-shadow: 0 0 0 3px var(--ai-blue-glow);
    background: rgba(255, 255, 255, 0.1);
}

#appPage .input-textarea:disabled {
    background: rgba(255, 255, 255, 0.02);
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.3);
}

#appPage .input-textarea:disabled::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

#appPage .character-counter {
    align-self: flex-end;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--soft-white);
    font-weight: 500;
}

@media (min-width: 1024px) {
    #appPage .character-counter {
        font-size: 0.85rem;
        margin-top: 12px;
    }
}

#appPage .character-counter.warning {
    color: #f44;
}

#appPage .decision-content {
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 0.85rem;
    color: var(--white);
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
    max-height: calc(100vh - 300px);
}

@media (min-width: 1024px) {
    #appPage .decision-content {
        font-size: 1rem;
        line-height: 1.8;
        padding-right: 12px;
    }
}

@media (min-width: 1440px) {
    #appPage .decision-content {
        font-size: 1.05rem;
        line-height: 1.9;
    }
}

#appPage .decision-content .error-message {
    color: #f44;
    font-weight: 500;
}

#appPage .button-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--border-subtle);
    padding: 16px 20px;
    gap: 12px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    display: flex;
}

@media (min-width: 1024px) {
    #appPage .button-bar {
        padding: 24px 60px;
        gap: 20px;
        max-width: 1400px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    }
}

@media (min-width: 1440px) {
    #appPage .button-bar {
        max-width: 1600px;
        padding: 28px 80px;
        gap: 24px;
    }
}

#appPage .action-button {
    flex: 1;
    background: var(--glass-bg);
    color: var(--white);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 16px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02rem;
}

@media (min-width: 1024px) {
    #appPage .action-button {
        font-size: 1.05rem;
        padding: 20px 24px;
        border-radius: 12px;
        letter-spacing: 0.05rem;
    }
}

@media (min-width: 1440px) {
    #appPage .action-button {
        font-size: 1.1rem;
        padding: 22px 28px;
    }
}

/* Mobile: active state */
#appPage .action-button:active:not(:disabled) {
    border-color: var(--soft-white);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    #appPage .action-button:hover:not(:disabled) {
        border-color: var(--soft-white);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
        transform: translateY(-3px);
    }
    
    #appPage .action-button:active:not(:disabled) {
        transform: translateY(-1px);
    }
}

#appPage .action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
}

#appPage .action-button.primary {
    background: linear-gradient(135deg, var(--ai-blue) 0%, var(--ai-blue-soft) 100%);
    color: var(--white);
    border-color: var(--ai-blue);
    box-shadow: 0 0 20px var(--ai-blue-glow);
}

/* Mobile: active state */
#appPage .action-button.primary:active:not(:disabled) {
    background: linear-gradient(135deg, var(--ai-blue) 0%, var(--ai-blue) 100%);
    box-shadow: 0 0 30px var(--ai-blue-glow);
}

/* Desktop: hover state */
@media (min-width: 1024px) {
    #appPage .action-button.primary:hover:not(:disabled) {
        background: linear-gradient(135deg, var(--ai-blue) 0%, var(--ai-blue) 100%);
        box-shadow: 0 0 40px var(--ai-blue-glow), 0 -5px 20px var(--ai-blue-glow);
        transform: translateY(-4px);
    }
    
    #appPage .action-button.primary:active:not(:disabled) {
        transform: translateY(-2px);
    }
}

#appPage .action-button.primary.locked {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--soft-white);
    box-shadow: none;
    cursor: pointer;
}

#appPage .action-button.primary.locked:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--soft-white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

@media (min-width: 1024px) {
    #appPage .action-button.primary.locked:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--soft-white);
        transform: translateY(-2px);
    }
}

#appPage .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 60px 20px;
    flex: 1;
    justify-content: center;
}

@media (min-width: 1024px) {
    #appPage .loading-container {
        gap: 30px;
        padding: 80px 40px;
    }
}

#appPage .loading-text {
    font-size: 1rem;
    color: var(--soft-white);
    text-align: center;
}

@media (min-width: 1024px) {
    #appPage .loading-text {
        font-size: 1.15rem;
    }
}

@media (min-width: 1440px) {
    #appPage .loading-text {
        font-size: 1.25rem;
    }
}
/* Timer Styles */
#appPage .loading-timer {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

#appPage .timer-seconds {
    font-size: 3rem;
    font-weight: 600;
    color: var(--ai-blue);
    text-shadow: 0 0 20px var(--ai-blue-glow);
    min-width: 60px;
    text-align: right;
}

#appPage .timer-label {
    font-size: 1.2rem;
    color: var(--soft-white);
    font-weight: 300;
}

@media (min-width: 1024px) {
    #appPage .timer-seconds {
        font-size: 4rem;
        min-width: 80px;
    }
    
    #appPage .timer-label {
        font-size: 1.4rem;
    }
}

