/* === PROMPT GENERATOR SPECIFIC STYLES === */

.main-stage {
    overflow: hidden;
}

.hero-text {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    transition: 0.5s;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(5px);
}

.headline {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.headline span { 
    background: linear-gradient(90deg, #60a5fa, #a78bfa); 
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; 
}

/* === INPUT CARD & 3D TILT === */
.input-wrapper-3d {
    width: 100%;
    max-width: 750px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, opacity 0.5s, transform 0.5s;
}

.glass-card {
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 10px;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.input-inner {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px 24px;
}

textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    resize: none;
    outline: none;
    min-height: 80px;
}
textarea::placeholder { color: rgba(255,255,255,0.3); }

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* === MODE DROPDOWN === */
.mode-container {
    position: relative;
}

.mode-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}
.mode-pill:hover, .mode-pill.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mode-pill span { color: #8b5cf6; }

.dropdown-menu {
    position: absolute;
    bottom: 120%;
    left: 0;
    width: 220px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.2s;
}

.dropdown-menu::-webkit-scrollbar { width: 4px; }
.dropdown-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.dropdown-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.dropdown-item.selected { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.dropdown-item i { opacity: 0; font-size: 14px; }
.dropdown-item.selected i { opacity: 1; }

.btn-glow {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 20px;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: 0.3s var(--ease-elastic);
    position: relative;
    overflow: hidden;
}
.btn-glow:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5); }
.btn-glow:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: scale(1);
}
.btn-glow:disabled:hover {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* === RESULT VIEW === */
#result-stage {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    z-index: 20;
}

#result-stage.show {
    display: flex;
    animation: fadeInResult 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-main-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    min-height: 100vh;
    justify-content: flex-start;
}

.result-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(-2px);
}

.btn-personalize {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    border: 1px solid rgba(139, 92, 246, 0.3);
    animation: personalizePulse 2s ease-in-out infinite;
}

.btn-personalize.animation-stopped {
    animation: none;
    background: rgba(139, 92, 246, 0.08);
    color: rgba(167, 139, 250, 0.4);
    transform: scale(1);
    box-shadow: none;
    border-color: rgba(139, 92, 246, 0.15);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-personalize:hover {
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

@keyframes personalizePulse {
    0%, 100% {
        background: rgba(139, 92, 246, 0.15);
        color: #a78bfa;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
        border-color: rgba(139, 92, 246, 0.3);
    }
    50% {
        background: rgba(139, 92, 246, 0.4);
        color: #e9d5ff;
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(139, 92, 246, 0), 0 8px 24px rgba(139, 92, 246, 0.6);
        border-color: rgba(167, 139, 250, 0.8);
    }
}

.result-mode-info {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
    text-align: center;
}

.result-mode-info strong {
    color: #8b5cf6;
}

.result-card-container {
    width: 100%;
    max-width: 800px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.result-toolbar {
    padding: 15px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.result-content {
    padding: 30px;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.hl-tag { color: #8b5cf6; font-weight: bold; }

/* === AI TOOLS SECTION === */
.ai-tools-section {
    padding: 24px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.ai-tools-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
}

.ai-tools-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ai-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.ai-tool-btn i {
    font-size: 16px;
}

.ai-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-tool-btn:active {
    transform: translateY(0);
}

@keyframes fadeInResult {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === RIGHT PANEL === */
.right-panel {
    width: 320px; 
    height: calc(100% - 40px); 
    margin: 20px 20px 20px 0;
    background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(20px); 
    border: 1px solid var(--glass-border);
    border-radius: 24px; 
    padding: 24px; 
    display: flex; 
    flex-direction: column;
    transform: translateX(20px); 
    opacity: 0; 
    animation: slideInRight 0.6s 0.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
.panel-header { 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: rgba(255,255,255,0.4); 
    margin-bottom: 20px; 
    font-weight: 700; 
}
.history-card {
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid transparent; 
    padding: 16px; 
    border-radius: 16px;
    margin-bottom: 10px; 
    cursor: pointer; 
    transition: 0.3s;
}
.history-card:hover { 
    background: rgba(255, 255, 255, 0.05); 
    border-color: rgba(255, 255, 255, 0.1); 
}
.h-title { 
    font-size: 14px; 
    font-weight: 600; 
    color: #fff; 
    margin-bottom: 4px; 
}
.h-sub { 
    font-size: 12px; 
    color: #64748b; 
}

/* === IMPROVE YOUR PROMPT PANEL === */
.improve-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 360px;
    max-height: calc(100vh - 40px);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 15;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.improve-panel.show {
    opacity: 1;
    transform: translateX(0);
}

.improve-panel::-webkit-scrollbar {
    width: 4px;
}

.improve-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.improve-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
}

.improve-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.improve-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
}

.improve-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.improve-item.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.improve-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.improve-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.improve-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.improve-icon {
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.improve-item.active .improve-icon {
    transform: rotate(180deg);
    color: #8b5cf6;
}

.improve-content {
    padding: 0 16px 16px 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.improve-description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.improve-input,
.improve-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.improve-input::placeholder,
.improve-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.improve-input:focus,
.improve-textarea:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.improve-textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-regenerate {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: 0.3s var(--ease-elastic);
    margin-top: 8px;
}

.btn-regenerate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-regenerate:active {
    transform: translateY(0);
}

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

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

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.8), 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* === LOADING BACKDROP === */
.loading-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.loading-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* === LOADING CARD === */
.loading-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 420px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 32px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.loading-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    border-radius: 24px;
}

.loading-card.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.loading-content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

.loading-spinner-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    font-size: 48px;
    color: #8b5cf6;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 28px;
    letter-spacing: -0.2px;
}

.loading-progress-wrapper {
    width: 100%;
}

.loading-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    transition: width 0.1s ease-out;
    position: relative;
    animation: progressGlow 2s ease-in-out infinite;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.loading-percentage {
    font-size: 28px;
    font-weight: 700;
    color: #8b5cf6;
    margin: 0;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    letter-spacing: -0.5px;
}

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

/* === RESPONSIVE WEB DESIGN === */

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .input-wrapper-3d {
        max-width: 850px;
    }
    
    .result-main-content {
        max-width: 900px;
    }
    
    .result-card-container {
        max-width: 900px;
    }
}

/* Desktop (1101px - 1399px) */
@media (max-width: 1399px) and (min-width: 1101px) {
    .improve-panel {
        width: 340px;
    }
}

/* Tablet and Small Desktop (max-width: 1100px) */
@media (max-width: 1100px) { 
    .right-panel { 
        display: none; 
    }
    
    .result-main-content {
        width: calc(100% - 80px);
        margin-right: 0;
        padding-right: 20px;
    }
    
    .improve-panel {
        display: none;
    }
    
    .headline {
        font-size: 48px;
    }
    
    .input-wrapper-3d {
        max-width: 90%;
    }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-stage {
        padding: 30px 20px;
    }
    
    .hero-text {
        margin-bottom: 40px;
    }
    
    .headline {
        font-size: 42px;
    }
    
    .input-wrapper-3d {
        max-width: 95%;
    }
    
    .glass-card {
        padding: 8px;
    }
    
    .input-inner {
        padding: 18px 20px;
    }
    
    textarea {
        font-size: 16px;
    }
    
    .result-main-content {
        padding: 30px 15px;
        width: calc(100% - 60px);
    }
    
    .result-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .result-mode-info {
        width: 100%;
        text-align: left;
        order: 3;
    }
    
    .result-content {
        padding: 24px;
        font-size: 14px;
    }
    
    .ai-tools-section {
        padding: 20px 24px;
    }
    
    .ai-tools-buttons {
        gap: 8px;
    }
    
    .ai-tool-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .loading-card {
        width: 380px;
        padding: 32px 24px;
    }
}

/* Mobile Landscape and Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
    
    .sidebar {
        width: 60px;
        padding: 20px 0;
    }
    
    .logo-box {
        width: 36px;
        height: 36px;
        font-size: 22px;
        margin-bottom: 30px;
    }
    
    .nav-item {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .main-stage {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .hero-text {
        margin-bottom: 30px;
    }
    
    .badge-new {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 15px;
    }
    
    .headline {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .input-wrapper-3d {
        max-width: 100%;
    }
    
    .glass-card {
        border-radius: 20px;
        padding: 6px;
    }
    
    .input-inner {
        padding: 16px 18px;
        border-radius: 16px;
    }
    
    textarea {
        font-size: 15px;
        min-height: 70px;
        line-height: 1.5;
    }
    
    .controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .mode-container {
        width: 100%;
    }
    
    .mode-pill {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }
    
    .dropdown-menu {
        width: 100%;
        left: 0;
    }
    
    .btn-glow {
        width: 100%;
        height: 48px;
    }
    
    .result-main-content {
        padding: 20px 10px;
        width: 100%;
        gap: 20px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .btn-back,
    .btn-personalize {
        width: 100%;
        justify-content: center;
    }
    
    .result-mode-info {
        text-align: center;
        order: 0;
        width: 100%;
    }
    
    .result-card-container {
        border-radius: 20px;
    }
    
    .result-toolbar {
        padding: 12px 18px;
    }
    
    .result-content {
        padding: 20px;
        font-size: 13px;
        line-height: 1.6;
    }
    
    .ai-tools-section {
        padding: 18px 20px;
    }
    
    .ai-tools-label {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .ai-tools-buttons {
        gap: 6px;
    }
    
    .ai-tool-btn {
        flex: 1;
        min-width: calc(50% - 3px);
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .ai-tool-btn span {
        display: none;
    }
    
    .improve-panel {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1000;
        transform: translateY(100%);
    }
    
    .improve-panel.show {
        transform: translateY(0);
    }
    
    .loading-card {
        width: calc(100% - 40px);
        max-width: 400px;
        padding: 28px 20px;
    }
    
    .loading-spinner {
        font-size: 40px;
    }
    
    .loading-text {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .loading-percentage {
        font-size: 24px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .sidebar {
        width: 50px;
        padding: 15px 0;
    }
    
    .logo-box {
        width: 32px;
        height: 32px;
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .nav-item {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .main-stage {
        padding: 15px 10px;
    }
    
    .hero-text {
        margin-bottom: 25px;
    }
    
    .badge-new {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }
    
    .headline {
        font-size: 26px;
        letter-spacing: -1px;
    }
    
    .glass-card {
        border-radius: 16px;
        padding: 5px;
    }
    
    .input-inner {
        padding: 14px 16px;
        border-radius: 14px;
    }
    
    textarea {
        font-size: 14px;
        min-height: 60px;
    }
    
    .mode-pill {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .btn-glow {
        height: 44px;
        border-radius: 12px;
    }
    
    .result-main-content {
        padding: 15px 8px;
    }
    
    .result-header {
        gap: 10px;
    }
    
    .btn-back,
    .btn-personalize {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .result-mode-info {
        font-size: 12px;
    }
    
    .result-card-container {
        border-radius: 16px;
    }
    
    .result-toolbar {
        padding: 10px 16px;
    }
    
    .result-content {
        padding: 16px;
        font-size: 12px;
    }
    
    .ai-tools-section {
        padding: 16px;
    }
    
    .ai-tools-buttons {
        gap: 5px;
    }
    
    .ai-tool-btn {
        padding: 8px 10px;
        font-size: 10px;
        border-radius: 10px;
    }
    
    .ai-tool-btn i {
        font-size: 14px;
    }
    
    .improve-panel {
        padding: 20px 16px;
    }
    
    .improve-panel-title {
        font-size: 16px;
    }
    
    .improve-header {
        padding: 12px;
    }
    
    .improve-title {
        font-size: 13px;
    }
    
    .improve-description {
        font-size: 12px;
    }
    
    .improve-input,
    .improve-textarea {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-regenerate {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .loading-card {
        padding: 24px 16px;
    }
    
    .loading-spinner {
        font-size: 36px;
    }
    
    .loading-text {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .loading-percentage {
        font-size: 20px;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .headline {
        font-size: 22px;
    }
    
    .result-content {
        font-size: 11px;
        padding: 14px;
    }
    
    .ai-tool-btn {
        padding: 6px 8px;
        font-size: 9px;
    }
}
