:root {
        --primary: #D63384;
        --primary-dark: #B52A6F;
        --primary-light: #F8BBD9;
        --primary-gradient: linear-gradient(135deg, #D63384, #E91E63);
        --secondary: #5A5A5A;
        --light-bg: #FDF8F8;
        --text-dark: #2D3748;
        --text-light: #718096;
        --shadow: 0 8px 30px rgba(214, 51, 132, 0.15);
        --border-radius: 20px;
        --success: #48BB78;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-dark);
    }

    * {
        scrollbar-width: thin;
        scrollbar-color: var(--primary) #f1f1f1;
    }

    body {
        background: linear-gradient(135deg, #FFF 0%, #FDF8F8 100%);
        color: var(--text-dark);
        line-height: 1.6;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        padding: 20px;
        height: 100vh;
        overflow: hidden;
    }

    .header {
        background: white;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        padding: 15px 25px;
        margin-bottom: 20px;
        border: 1px solid rgba(214, 51, 132, 0.1);
        flex-shrink: 0;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 1400px;
        margin: 0 auto;
    }

    .logo {
        font-size: 1.3rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .logo a {
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .nav-links {
        display: flex;
        gap: 25px;
        align-items: center;
    }

    .nav-link {
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        padding: 8px 16px;
        border-radius: 12px;
        white-space: nowrap;
    }

    .nav-link:hover {
        color: var(--primary);
        background: rgba(214, 51, 132, 0.05);
    }

    .nav-link.active {
        color: var(--primary);
        background: rgba(214, 51, 132, 0.08);
    }

    .auth-links {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .login-link {
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
        padding: 8px 16px;
        border-radius: 10px;
        transition: all 0.3s ease;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .login-link:hover {
        background: rgba(214, 51, 132, 0.05);
        color: var(--primary);
    }

    .register-link {
        background: var(--primary-gradient);
        color: white;
        text-decoration: none;
        font-weight: 600;
        padding: 10px 20px;
        border-radius: 10px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .register-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(214, 51, 132, 0.35);
    }

    .mobile-settings-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 3000;
        justify-content: center;
        align-items: flex-end;
    }

    .mobile-settings-modal.active {
        display: flex;
    }

    .mobile-settings-content {
        background: white;
        width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        padding: 25px 20px;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .mobile-settings-modal.active .mobile-settings-content {
        transform: translateY(0);
    }

    .mobile-settings-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #e2e8f0;
    }

    .mobile-settings-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    .mobile-settings-close {
        background: none;
        border: none;
        font-size: 1.3rem;
        color: var(--text-dark);
        cursor: pointer;
        padding: 5px;
    }

    .mobile-settings-section {
        margin-bottom: 25px;
    }

    .mobile-settings-section-title {
        font-weight: 600;
        margin-bottom: 12px;
        color: var(--text-dark);
        font-size: 1rem;
    }

    .mobile-settings-btn {
        display: none;
        background: var(--primary-gradient);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(214, 51, 132, 0.3);
        align-items: center;
        gap: 8px;
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
    }

    .mobile-settings-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(214, 51, 132, 0.4);
    }

    .mobile-menu-btn {
        display: none;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-dark);
        cursor: pointer;
        padding: 5px;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: white;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 25px 20px;
        background: linear-gradient(135deg, #D63384 0%, #E91E63 50%, #9C27B0 100%);
        color: white;
        position: relative;
        overflow: hidden;
    }

    .mobile-menu-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: bold;
        font-size: 1.3rem;
        color: white;
        position: relative;
        z-index: 1;
    }

    .mobile-menu-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

    .mobile-menu-content {
        flex: 1;
        padding: 20px;
        background: white;
    }

    .mobile-menu-section {
        margin-bottom: 30px;
    }

    .mobile-menu-section-title {
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--text-dark);
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary-light);
    }

    .mobile-menu-section-title::before {
        content: '';
        width: 4px;
        height: 20px;
        background: var(--primary-gradient);
        border-radius: 2px;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px;
        color: var(--text-dark);
        text-decoration: none;
        transition: all 0.3s ease;
        border: none;
        background: white;
        width: 100%;
        text-align: left;
        font-size: 1rem;
        border-radius: 12px;
        margin-bottom: 8px;
        border: 1px solid #f0f0f0;
        position: relative;
        overflow: hidden;
    }

    .mobile-menu-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 0;
        background: var(--primary-gradient);
        transition: width 0.3s ease;
        z-index: 0;
    }

    .mobile-menu-link:hover {
        transform: translateX(5px);
        border-color: var(--primary-light);
        box-shadow: 0 4px 15px rgba(214, 51, 132, 0.1);
    }

    .mobile-menu-link:hover::before {
        width: 4px;
    }

    .mobile-menu-link.active {
        background: linear-gradient(135deg, rgba(214, 51, 132, 0.05) 0%, rgba(233, 30, 99, 0.05) 100%);
        border-color: var(--primary);
        color: var(--primary);
        font-weight: 600;
    }

    .mobile-menu-link.active::before {
        width: 4px;
    }

    .mobile-menu-link i {
        width: 20px;
        text-align: center;
        position: relative;
        z-index: 1;
        color: var(--primary);
    }

    .mobile-menu-link span {
        position: relative;
        z-index: 1;
    }

    .mobile-menu-link.active i {
        color: var(--primary);
    }

    .main-content {
        max-width: 1400px;
        margin: 0 auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: 100%;
    }

    .chat-container {
        background: white;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        overflow: hidden;
        border: 1px solid rgba(214, 51, 132, 0.1);
        display: flex;
        flex-direction: column;
        flex: 1;
        height: 100%;
    }

    .chat-header {
        background: linear-gradient(135deg, #D63384 0%, #E91E63 50%, #9C27B0 100%);
        padding: 20px 25px;
        color: white;
        flex-shrink: 0;
    }

    .chat-header-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chat-header-user {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .avatar {
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
    }

    .user-info h3 {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .user-info p {
        display: flex;
        align-items: center;
        gap: 8px;
        opacity: 0.9;
        font-size: 0.85rem;
    }

    .online-dot {
        width: 8px;
        height: 8px;
        background: #48BB78;
        border-radius: 50%;
    }

    .usage-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .pro-badge, .usage-badge {
        background: rgba(255, 255, 255, 0.2);
        padding: 6px 12px;
        border-radius: 16px;
        font-size: 0.8rem;
        font-weight: 600;
        backdrop-filter: blur(10px);
    }

    .pro-badge {
        background: rgba(255, 215, 0, 0.3);
    }

    .chat-messages {
        padding: 20px 25px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 200px;
        background: #ffffff;
    }

    .message {
        display: flex;
        margin-bottom: 20px;
        align-items: flex-end;
    }

    .message-user {
        justify-content: flex-end;
    }

    .message-partner {
        justify-content: flex-start;
    }

    .message-content {
        max-width: 70%;
        position: relative;
    }

    .message-user .message-content {
        background: var(--primary-gradient);
        color: white;
        padding: 12px 18px;
        border-radius: 18px 18px 5px 18px;
    }

    .message-partner .message-content {
        background: #f7fafc;
        color: var(--text-dark);
        padding: 12px 18px;
        border-radius: 18px 18px 18px 5px;
        border: 1px solid #e2e8f0;
    }

    .message-text {
        line-height: 1.5;
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .message-time {
        font-size: 0.7rem;
        color: var(--text-light);
        margin: 0 8px;
        white-space: nowrap;
    }

    .typing-indicator {
        display: none;
        align-items: center;
        gap: 10px;
        padding: 12px 18px;
        background: #f7fafc;
        border-radius: 18px 18px 18px 5px;
        border: 1px solid #e2e8f0;
        margin-bottom: 20px;
        max-width: 70%;
        color: var(--text-light);
        font-size: 0.9rem;
    }

    .typing-dots {
        display: flex;
        gap: 4px;
    }

    .typing-dot {
        width: 6px;
        height: 6px;
        background: var(--primary);
        border-radius: 50%;
        animation: typing 1.4s infinite ease-in-out;
    }

    .typing-dot:nth-child(1) { animation-delay: -0.32s; }
    .typing-dot:nth-child(2) { animation-delay: -0.16s; }

    @keyframes typing {
        0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
        40% { transform: scale(1); opacity: 1; }
    }

    .queue-timer {
        display: none;
        align-items: center;
        gap: 10px;
        padding: 12px 18px;
        background: #f7fafc;
        border-radius: 18px 18px 18px 5px;
        border: 1px solid #e2e8f0;
        margin-bottom: 20px;
        max-width: 70%;
        color: var(--text-dark);
        font-size: 0.9rem;
    }

    .timer-container {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .timer-text {
        font-weight: 500;
        color: var(--primary);
    }

    .timer-countdown {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary);
        text-align: center;
    }

    .timer-bar-container {
        width: 100%;
        height: 6px;
        background: #e2e8f0;
        border-radius: 3px;
        overflow: hidden;
    }

    .timer-bar {
        height: 100%;
        background: var(--primary-gradient);
        width: 100%;
        transition: width 1s linear;
    }

    .register-promo {
        font-size: 0.8rem;
        color: var(--text-light);
        text-align: center;
        margin-top: 5px;
    }

    .register-promo a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
    }

    .register-promo a:hover {
        text-decoration: underline;
    }

    .story-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        flex-wrap: wrap;
    }

    .story-btn {
        background: white;
        border: 1px solid #e2e8f0;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 5px;
        color: var(--text-dark);
    }

    .story-btn:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .chat-input-fixed {
        background: white;
        padding: 20px;
        border-top: 1px solid #e2e8f0;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    .chat-input-container {
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .settings-container {
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .settings-container.collapsed .settings-content {
        display: none;
    }

    .settings-container.expanded .settings-content {
        display: grid;
    }

    .input-actions-container {
        flex-shrink: 0;
        display: flex;
        flex-direction: row;
        gap: 15px;
        align-items: flex-end;
    }

    .input-wrapper {
        margin-bottom: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .input-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        font-size: 0.8rem;
        color: var(--text-light);
        flex-shrink: 0;
    }

    .input-field {
        flex: 1;
    }

    .chat-input {
        width: 100%;
        min-height: 50px;
        max-height: 200px;
        padding: 15px 20px;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        font-size: 1rem;
        resize: none;
        transition: all 0.3s ease;
        font-family: inherit;
        line-height: 1.4;
        overflow-y: auto;
    }

    .chat-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
    }

    .char-counter {
        font-weight: 600;
    }

    .char-counter.warning {
        color: #e53e3e;
    }

    .send-actions {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .send-btn {
        background: var(--primary-gradient);
        color: white;
        border: none;
        padding: 16px 24px;
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(214, 51, 132, 0.3);
        height: 50px;
        white-space: nowrap;
    }

    .send-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(214, 51, 132, 0.4);
    }

    .send-btn:disabled {
        background: #e2e8f0;
        color: #a0aec0;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .generation-settings {
        background: rgba(214, 51, 132, 0.03);
        border-radius: 12px;
        padding: 15px;
        border: 1px solid rgba(214, 51, 132, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .settings-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .settings-title {
        font-weight: 600;
        color: var(--text-dark);
        font-size: 1rem;
    }

    .settings-toggle {
        background: none;
        border: none;
        color: var(--primary);
        cursor: pointer;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .settings-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        transition: all 0.3s ease;
    }

    .control-group {
        display: flex;
        flex-direction: column;
    }

    .form-label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--text-dark);
        font-size: 0.9rem;
    }

    .form-hint {
        font-size: 0.75rem;
        color: var(--text-light);
        margin-top: 4px;
    }

    .slider-container {
        margin-top: 6px;
    }

    .slider-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .length-slider {
        flex: 1;
        -webkit-appearance: none;
        height: 6px;
        border-radius: 3px;
        background: #e2e8f0;
        outline: none;
    }

    .length-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--primary);
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
    }

    .length-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--primary);
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
        border: none;
    }

    .length-value {
        font-weight: 600;
        color: var(--primary);
        min-width: 70px;
        text-align: center;
        font-size: 0.85rem;
    }

    .style-tags-container {
        max-height: 120px;
        overflow-y: auto;
        padding: 8px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 6px;
        margin-top: 6px;
        border: 1px solid #e2e8f0;
    }

    .style-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .style-tag {
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--text-dark);
        white-space: nowrap;
    }

    .style-tag:hover {
        background: white;
        border-color: var(--primary-light);
        transform: translateY(-1px);
    }

    .style-tag.active {
        background: var(--primary-gradient);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
    }

    .style-tag.locked {
        opacity: 0.5;
        cursor: not-allowed;
        position: relative;
    }

    .style-tag.locked::after {
        content: '🔒';
        position: absolute;
        top: -4px;
        right: -4px;
        background: var(--primary);
        color: white;
        border-radius: 50%;
        width: 14px;
        height: 14px;
        font-size: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .audio-toggle-compact {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: white;
        padding: 10px 14px;
        border-radius: 8px;
        border: 2px solid #e2e8f0;
        transition: all 0.3s ease;
        cursor: pointer;
        margin-top: 8px;
    }

    .audio-toggle-compact:hover {
        border-color: var(--primary-light);
    }

    .audio-toggle-compact.active {
        border-color: var(--primary);
        background: rgba(214, 51, 132, 0.05);
    }

    .audio-toggle-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
        font-size: 0.85rem;
    }

    .audio-toggle-icon {
        font-size: 1rem;
        color: var(--primary);
    }

    .audio-toggle-switch {
        position: relative;
        width: 36px;
        height: 18px;
        background: #e2e8f0;
        border-radius: 9px;
        transition: all 0.3s ease;
    }

    .audio-toggle-switch::after {
        content: '';
        position: absolute;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: white;
        top: 2px;
        left: 2px;
        transition: all 0.3s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .audio-toggle-compact.active .audio-toggle-switch {
        background: var(--primary);
    }

    .audio-toggle-compact.active .audio-toggle-switch::after {
        transform: translateX(18px);
    }

    .voice-selection-wrapper {
        margin-top: 8px;
        transition: all 0.3s ease;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
    }

    .voice-selection-wrapper.show {
        max-height: 100px;
        opacity: 1;
    }

    .voice-options-row {
        display: flex;
        gap: 6px;
        align-items: center;
        margin-bottom: 6px;
    }

    .voice-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 8px;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 500;
        font-size: 0.8rem;
    }

    .voice-btn:hover {
        border-color: var(--primary-light);
    }

    .voice-btn.active {
        border-color: var(--primary);
        background: rgba(214, 51, 132, 0.05);
        color: var(--primary);
    }

    .preview-toggle {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 10px;
        background: rgba(214, 51, 132, 0.1);
        border: 1px solid rgba(214, 51, 132, 0.2);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--primary);
        white-space: nowrap;
    }

    .preview-toggle:hover {
        background: rgba(214, 51, 132, 0.15);
    }

    .preview-toggle.active {
        background: var(--primary);
        color: white;
    }

    .categories-container {
        max-height: 120px;
        overflow-y: auto;
        padding: 8px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 6px;
        margin-top: 6px;
        border: 1px solid #e2e8f0;
    }

    .categories-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .category-btn {
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--text-dark);
        white-space: nowrap;
    }

    .category-btn:hover {
        background: white;
        border-color: var(--primary-light);
        transform: translateY(-1px);
    }

    .category-btn.active {
        background: var(--primary-gradient);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
    }

    @media (max-width: 910px) {
        .nav-links, .auth-links {
            display: none;
        }

        .mobile-menu-btn {
            display: block;
        }
    }

    @media (max-width: 768px) {
        body {
            padding: 15px;
        }

        .header {
            padding: 12px 20px;
        }

        .header-content {
            flex-direction: row;
            justify-content: space-between;
            gap: 0;
        }

        .logo {
            font-size: 1.2rem;
        }

        .logo i {
            font-size: 1.3rem;
        }

        .settings-container {
            display: none;
        }

        .mobile-settings-btn {
            display: flex;
        }

        .chat-header-info {
            flex-direction: column;
            gap: 15px;
            align-items: flex-start;
        }

        .message-content {
            max-width: 85%;
        }

        .story-actions {
            flex-direction: column;
        }

        .story-btn {
            justify-content: center;
        }

        .voice-options-row {
            flex-direction: row;
            align-items: center;
        }

        .voice-btn {
            flex: 1;
            min-width: 0;
        }

        .preview-toggle {
            width: auto;
            min-width: 65px;
            justify-content: center;
        }

        .chat-messages {
            padding: 15px 20px;
        }

        .chat-header {
            padding: 20px;
        }

        .input-actions-container {
            flex-direction: column;
            gap: 10px;
        }

        .input-wrapper {
            width: 100%;
        }

        .input-header {
            margin-bottom: 5px;
        }

        .send-actions {
            margin-bottom: 0;
            width: 100%;
            margin-top: 5px;
        }

        .send-btn {
            width: 100%;
            justify-content: center;
        }

        .chat-input-fixed {
            padding: 15px;
        }

        .chat-input {
            overflow-y: hidden;
            resize: none;
            min-height: 50px;
            max-height: 150px;
        }

        .style-tags-container,
        .categories-container {
            max-height: 100px;
        }
    }

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

        .header {
            padding: 10px 15px;
        }

        .chat-header {
            padding: 15px;
        }

        .avatar {
            width: 40px;
            height: 40px;
            font-size: 1.3rem;
        }

        .user-info h3 {
            font-size: 1.1rem;
        }

        .user-info p {
            font-size: 0.8rem;
        }

        .chat-messages {
            padding: 10px 15px;
        }

        .message-content {
            max-width: 90%;
        }

        .generation-settings {
            padding: 12px;
        }

        .style-tag, .category-btn {
            font-size: 0.7rem;
            padding: 5px 8px;
        }

        .send-btn {
            padding: 14px 20px;
            font-size: 0.9rem;
        }

        .chat-input-fixed {
            padding: 12px;
        }

        .style-tags-container,
        .categories-container {
            max-height: 80px;
        }
    }

    @media (max-width: 408px) {
        .input-wrapper {
            width: 100%;
        }

        .input-actions-container {
            gap: 8px;
        }
    }

    /* Дополнительные стили для хедера */
.profile-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.profile-link:hover {
    background: rgba(214, 51, 132, 0.05);
    color: var(--primary);
}

.logout-icon {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.logout-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    transform: scale(1.1);
}
