@font-face {
    font-family: 'AnuScript';
    src: url('fonts/anuscript1.woff2') format('woff2'),
        url('fonts/anuscript1.woff') format('woff'),
        url('fonts/anuscript1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #0b1120;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --info-bg: rgba(56, 189, 248, 0.1);
    --info-border: rgba(56, 189, 248, 0.2);
    --primary-color: #38bdf8;

    --primary-glow: rgba(56, 189, 248, 0.4);
    --text-color: #f1f5f9;
    --text-dim: #94a3b8;
    --accent: #818cf8;
    --accent-glow: rgba(129, 140, 248, 0.4);
    --textarea-bg: rgba(15, 23, 42, 0.6);
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

body.light-mode {
    --bg-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --info-bg: rgba(2, 132, 199, 0.05);
    --info-border: rgba(2, 132, 199, 0.1);
    --primary-color: #0284c7;

    --primary-glow: rgba(2, 132, 199, 0.2);
    --text-color: #0f172a;
    --text-dim: #475569;
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.2);
    --textarea-bg: #ffffff;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: 
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.05) 0%, transparent 40%),
        var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
    background: 
        radial-gradient(circle at 20% 20%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
        var(--bg-color);
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    width: 85%;
    max-width: 1400px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

.branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.app-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.branding:hover .app-logo {
    transform: rotate(5deg) scale(1.05);
}

.app-name {
    font-family: 'Ramabhadra', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    position: relative;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
}

.footer-links a:hover {
    color: var(--primary-color);
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

footer p {
    color: var(--text-dim);
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 0.05em;
}
.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.header-top h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.8;
}


 
.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}
 
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
 
.header-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    position: absolute;
    right: 10px;
    top: -5px;
}
 
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        position: static;
        margin: 10px 0;
    }
}


.header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.input-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}

#record-btn.recording {
    color: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

#record-btn.pulse {
    animation: simplePulse 1s infinite alternate;
    color: #ef4444;
}

@keyframes simplePulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.15); opacity: 0.6; }
}


.visualizer-container {
    display: none;
    align-items: center;
    gap: 3px;
    height: 24px;
    padding: 0 5px;
}

.recording + .visualizer-container {
    display: flex !important;
}

@media (max-width: 768px) {
    .visualizer-container {
        display: none !important;
    }
}


.vis-bar {
    width: 3px;
    height: 4px;
    background: #ef4444;
    border-radius: 2px;
    transition: height 0.05s ease;
    min-height: 3px;
}


.toggle-container.mini {
    padding: 4px 10px;
    font-size: 0.7rem;
    gap: 6px;
}

.switch.mini {
    width: 32px;
    height: 18px;
}

.switch.mini .slider:before {
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
}

.switch.mini input:checked+.slider:before {
    transform: translateX(14px);
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.highlight {
    background: linear-gradient(90deg, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-dim);
}

.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(15, 23, 42, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-glow);
}

.upload-area:hover::before {
    opacity: 0.15;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(56, 189, 248, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-dim);
}

.upload-content svg {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
    animation: floatArrow 2s ease-in-out infinite;
}

@keyframes floatArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.status-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.hidden {
    display: none !important;
}

/* Info Modal Styling */
#info-modal-media img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 350px;
    object-fit: cover;
}

#info-modal-media .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

#info-modal-media .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#info-modal-body p {
    margin-bottom: 15px;
}

/* Premium Information Slider */
.info-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.info-slider-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.info-slide, .info-slide-text {
    flex: 0 0 100%;
    width: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #000;
}

.info-slide img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.info-slide .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.info-slide .video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

.info-slide-text {
    padding: 30px 40px;
    background: var(--bg-color);
    text-align: left;
}

.info-slider-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.info-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.info-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-glow);
}

.info-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0; /* Hidden by default, show on hover */
}

.info-slider-container:hover .info-slider-arrow {
    opacity: 1;
}

.info-slider-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.info-slider-arrow.prev { left: 15px; }
.info-slider-arrow.next { right: 15px; }

@media (max-width: 600px) {
    .info-slide-text { padding: 20px 25px; }
    .info-slider-arrow { display: none; } /* Hide arrows on small mobile, use swipe */
}

/* Tier Locked Features */
.locked-feature {
    filter: grayscale(1) opacity(0.6);
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.tier-lock {
    color: #f59e0b;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4));
    display: inline-block;
    vertical-align: middle;
}

/* OTP Input Boxes */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
}

.otp-container input {
    width: 55px;
    height: 70px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.otp-container input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.otp-container input:not(:placeholder-shown) {
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.6);
}

/* Disabled Controls State */
.controls-disabled {
    pointer-events: none;
    opacity: 0.6;
    filter: grayscale(1);
    cursor: not-allowed;
    transition: all 0.3s ease;
}

textarea.controls-disabled {
    background: rgba(255,255,255,0.05) !important;
    opacity: 0.4;
}

.icon-btn.controls-disabled, .switch.controls-disabled {
    opacity: 0.3;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent));
    transition: width 0.3s ease;
}

.top-row {
    display: grid;
    grid-template-columns: 3fr 7fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.instructions-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    color: var(--text-color);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

.instructions-box h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* News Ticker Styles */
.news-ticker-container {
    display: flex;
    align-items: center;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid var(--info-border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    height: 40px;
}

.news-ticker-label {
    background: var(--primary-color);
    color: white;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.news-ticker-content {
    white-space: nowrap;
    padding-left: 100%;
    display: inline-block;
    animation: scroll-left 25s linear infinite;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.news-ticker-container:hover .news-ticker-content {
    animation-play-state: paused;
}

/* Info Alert Box Styles */
.info-alert-box {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: 18px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideDown 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.info-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
    opacity: 0.9;
}

.info-item p strong {
    color: var(--primary-color);
}

.instructions-box ul {
    list-style: none;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
}

.instructions-box li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dim);
    position: relative;
    padding-left: 20px;
    transition: color 0.2s ease;
}

.instructions-box li:hover {
    color: var(--text-color);
}

.instructions-box li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.instructions-box li strong {
    color: var(--text-color);
    font-weight: 600;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 0;
    margin-bottom: 30px;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
}

.label-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

textarea {
    width: 100%;
    height: 350px;
    background: var(--textarea-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 0 0 4px var(--primary-glow), inset 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

body.light-mode textarea:focus {
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}
#unicode-input {
    font-family: 'Ramabhadra', 'Inter', sans-serif;
}

#anu-output {
    font-family: 'AnuScript', sans-serif;
    color: #e40c0c;
    /* Goldish color for visibility */
}

.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.arrow {
    width: 30px;
    height: 30px;
    border-top: 2px solid var(--glass-border);
    border-right: 2px solid var(--glass-border);
    transform: rotate(45deg);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu {
    position: absolute;
    right: 0;
    top: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.export-menu button {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 8px 12px;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    width: 100%;
}

.export-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent);
    color: #fff;
    padding: 12px 24px;
    border-radius: 99px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 850px) {
    body {
        padding: 10px;
    }

    .glass-container {
        padding: 20px;
        max-width: 100%;
        border-radius: 16px;
    }

    header {
        margin-bottom: 25px;
    }

    .app-name {
        font-size: 2rem;
    }

    .converter-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .instructions-box ul {
        grid-template-columns: 1fr;
    }

    .divider {
        height: 60px;
        margin: 10px 0;
    }

    .arrow {
        transform: rotate(135deg);
        width: 24px;
        height: 24px;
    }

    textarea {
        height: 300px;
        padding: 18px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .glass-container {
        padding: 15px;
    }

    .app-name {
        font-size: 1.7rem;
    }

    .header-top {
        margin-bottom: 10px;
    }

    .header-top h1 {
        font-size: 1.1rem;
    }

    header {
        margin-bottom: 20px;
    }

    .header-controls p {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .label-row {
        margin-bottom: 8px;
    }

    .input-actions {
        width: 100%;
        justify-content: center;
        background: rgba(15, 23, 42, 0.1);
        padding: 8px 12px;
        border-radius: 12px;
        gap: 8px;
        margin-bottom: 12px;
    }

    label {
        font-size: 0.8rem;
        padding-left: 0;
    }

    textarea {
        height: 250px;
        padding: 14px;
    }

    .upload-area {
        padding: 15px;
        margin-bottom: 20px;
    }

    .upload-content {
        gap: 10px;
    }

    .upload-content svg {
        width: 36px;
        height: 36px;
    }

    .upload-content span {
        font-size: 0.8rem;
    }

    .branding {
        gap: 10px;
        margin-bottom: 10px;
    }

    .app-logo {
        width: 45px;
        height: 45px;
    }

    /* Hide unnecessary information on mobile */
    .news-ticker-container,
    .info-alert-box,
    .instructions-box {
        display: none !important;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .app-name {
        font-size: 1.4rem;
    }
    
    .header-top h1 {
        font-size: 1rem;
    }
    
    textarea {
        height: 180px;
    }
    
    .input-actions {
        padding: 2px;
    }
}

/* User Auth & Modals */
.user-auth-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-auth-top .btn {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn.primary:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn.block {
    display: flex;
    width: 100%;
    margin-top: 15px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-content h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: var(--text-color);
    text-align: center;
}

.modal-content p {
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

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

.form-group input {
    width: 100%;
    padding: 14px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.6);
}

.modal-alt {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.modal-alt a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

/* Convert Button in Divider */
.convert-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.convert-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.convert-btn .arrow {
    transform: rotate(0deg);
    border-color: white;
    width: 10px;
    height: 10px;
    margin-top: -2px;
}

.arrow-static {
    width: 0; 
    height: 0; 
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--glass-border);
}

/* Trial Expired Lock */
.trial-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.lock-card {
    text-align: center;
    padding: 60px;
    max-width: 550px;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.lock-icon-large {
    font-size: 5rem;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

.lock-actions {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

#user-profile-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

#user-profile-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

#nav-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    width: 280px;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: dropdownFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#user-profile-nav:hover .profile-dropdown {
    display: flex;
}

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

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-info-value {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 500;
}

.profile-sub-status {
    padding: 10px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.profile-sub-status.premium {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.profile-sub-status.premium .profile-info-value {
    color: #22c55e;
}

/* Subscription Plans Modal Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.plan-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-card:hover {
    border-color: var(--primary-color);
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.plan-card.popular {
    border-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.plan-card.popular::after {
    content: "POPULAR";
    position: absolute;
    top: 10px;
    right: -25px;
    background: var(--primary-color);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 30px;
    transform: rotate(45deg);
}

.plan-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.plan-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-dim);
}

.plan-savings {
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    align-self: center;
}

@media (max-width: 480px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-dropdown {
        width: calc(100vw - 40px);
        right: -20px;
    }
}

.hidden {
    display: none !important;
}