:root {
    /* Dark theme (default) */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(30, 30, 46, 0.95);
    --bg-input: rgba(20, 20, 35, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent-primary: #8b5cf6;
    --accent-secondary: #c084fc;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #c084fc);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --border-color: rgba(139, 92, 246, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-opacity: 0.95;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(241, 245, 249, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --accent-primary: #8b5cf6;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #a855f7);
    --success: #16a34a;
    --warning: #d97706;
    --error: #dc2626;
    --info: #2563eb;
    --border-color: rgba(139, 92, 246, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-opacity: 0.98;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.3s ease;
}

/* Star Background */
.star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background-color: var(--text-primary);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: var(--brightness); transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Mouse following background effect */
.mouse-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.15) 0%, rgba(139, 92, 246, 0.1) 30%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease-out;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Header with Controls */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 2px solid var(--border-color);
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(192, 132, 252, 0.5);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.icon-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.about-btn {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-secondary);
    border: 1px solid rgba(139, 92, 246, 0.5);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Input field styles */
.input-field {
    padding: 12px 15px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 10px 40px var(--shadow-color);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--accent-secondary);
    margin: 0;
    font-size: 22px;
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: var(--accent-secondary);
}

.modal-content h3 {
    color: var(--accent-primary);
    margin: 18px 0 12px;
    font-size: 18px;
}

.modal-content p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}

.modal-content ul {
    color: var(--text-primary);
    margin-left: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.modal-content li {
    margin-bottom: 8px;
}

.modal-content li i {
    color: var(--accent-secondary);
    margin-right: 8px;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-primary);
}

.theme-selector {
    display: flex;
    gap: 10px;
}

.theme-btn {
    padding: 8px 15px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn.active {
    background: var(--accent-gradient);
    color: white;
}

.theme-btn:hover:not(.active) {
    background: rgba(139, 92, 246, 0.2);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(139, 92, 246, 0.2);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Button Styling */
.btn {
    padding: 12px 20px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.5);
    color: var(--accent-secondary);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* Stats Container */
.stats-container {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-box {
    text-align: center;
    background: rgba(139, 92, 246, 0.1);
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 120px;
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Version Info */
.version-info {
    text-align: center;
    color: var(--text-tertiary);
    margin-top: 20px;
    font-size: 12px;
}

/* Footer with fixed sticky behavior */
.footer {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--border-color);
    margin-top: auto;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-content {
    display: inline-block;
    text-align: center;
}

.footer-text {
    font-size: 1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Fixed RGB Star Animation */
.rgb-star {
    display: inline-block;
    position: relative;
}

.rgb-star::after {
    content: '💫';
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(
        to right,
        #ff0000, #ff00ff, #0000ff, 
        #00ffff, #00ff00, #ffff00, #ff0000
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rgbCycle 5s linear infinite;
    background-size: 200% auto;
}

@keyframes rgbCycle {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Message styles */
.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.warning-message {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.info-message {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

/* Ripple Animation */
@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Humizez AI Chat Interface */
.ai-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-bottom: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 1100px; /* Increased from 600px to 700px */
}

.ai-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-header h2 {
    color: var(--accent-secondary);
    margin: 0;
    font-size: 18px;
}

.ai-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ai-status.online {
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48ZyBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMzBtLTI4IDBhMjggMjggMCAxIDAgNTYgMCAyOCAyOCAwIDEgMC01NiAwIiBzdHJva2U9InJnYmEoMTM5LCA5MiwgMjQ2LCAwLjA1KSIgc3Ryb2tlLXdpZHRoPSIxIi8+PHBhdGggZD0iTTMwIDMwbS0yMCAwYTIwIDIwIDAgMSAwIDQwIDAgMjAgMjAgMCAxIDAtNDAgMCIgc3Ryb2tlPSJyZ2JhKDEzOSwgOTIsIDI0NiwgMC4wNSkiIHN0cm9rZS13aWR0aD0iMSIvPjxwYXRoIGQ9Ik0zMCAzMG0tMTIgMGExMiAxMiAwIDEgMCAyNCAwIDEyIDEyIDAgMSAwLTI0IDAiIHN0cm9rZT0icmdiYSgxMzksIDkyLCAyNDYsIDAuMDUpIiBzdHJva2Utd2lkdGg9IjEiLz48L2c+PC9zdmc+');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.message-content {
    background: rgba(139, 92, 246, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.user-message .message-content {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.message-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap; /* Preserve line breaks */
}

.message-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
    text-align: right;
}

.input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: var(--bg-card);
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-gradient);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.send-btn:active {
    transform: translateY(0);
}

.ai-features {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
}

.feature-item i {
    color: var(--accent-secondary);
    font-size: 18px;
}

.feature-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-secondary);
    display: inline-block;
    animation: typingDot 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingDot {
    0%, 80%, 100% { 
        transform: scale(0.6);
        opacity: 0.6;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Updated Humanizer Controls */
.humanizer-controls {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
}

.controls-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.style-selector, .strength-selector, .complexity-selector, .punctuation-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.style-selector label, .strength-selector label, .complexity-selector label, .punctuation-selector label {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 80px;
}

.style-selector select, .complexity-selector select, .punctuation-selector select {
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    flex-grow: 1;
}

.strength-selector input {
    width: 100px;
}

#strengthValue {
    font-size: 14px;
    color: var(--accent-secondary);
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.checkboxes {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    align-items: center;
    justify-content: space-between;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
}

.option-checkbox label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.preset-btn {
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-secondary);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Example section */
.example-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.example-section h3 {
    margin-bottom: 15px;
    color: var(--accent-secondary);
}

.example-container {
    display: flex;
    gap: 20px;
}

.example-box {
    flex: 1;
    padding: 15px;
    background: var(--bg-input);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.example-box h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.example-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Presets styles */
.presets-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-input);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.preset-item:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.preset-info {
    flex: 1;
}

.preset-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
}

.preset-details {
    font-size: 12px;
    color: var(--text-secondary);
}

.preset-actions {
    display: flex;
    gap: 8px;
}

.preset-btn-small {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn-small:hover {
    background: rgba(139, 92, 246, 0.2);
}

.preset-btn-small.delete {
    color: var(--error);
}

.preset-btn-small.delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.input-group .input-field {
    flex: 1;
}

@media (max-width: 768px) {
    .ai-container {
        height: 600px; /* Increased from 500px to 600px */
    }
    
    .message {
        max-width: 90%;
    }
    
    .ai-features {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .style-selector, .strength-selector, .complexity-selector, .punctuation-selector {
        width: 100%;
    }
    
    .example-container {
        flex-direction: column;
    }
    
    .checkboxes {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preset-btn {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .input-group {
        flex-direction: column;
    }
}

/* Tiered Controls */
.tiered-controls {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
}

.tiered-controls h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-secondary);
}

.tier-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tier-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tier-btn i {
    font-size: 20px;
    color: var(--text-secondary);
}

.tier-btn span {
    font-size: 14px;
    font-weight: 500;
}

.tier-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.tier-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
}

.tier-btn.active i {
    color: white;
}

.tier-btn.settings {
    background: rgba(139, 92, 246, 0.1);
}

.tier-btn.settings:hover {
    background: rgba(139, 92, 246, 0.2);
}

@media (max-width: 768px) {
    .tier-buttons {
        flex-direction: column;
    }
    
    .tier-btn {
        flex-direction: row;
        justify-content: center;
    }
}
/* Tiered Controls */
.tiered-controls {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
}

.tiered-controls h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-secondary);
}

.tier-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tier-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tier-btn i {
    font-size: 20px;
    color: var(--text-secondary);
}

.tier-btn span {
    font-size: 14px;
    font-weight: 500;
}

.tier-btn small {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}

.tier-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.tier-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
}

.tier-btn.active i,
.tier-btn.active small {
    color: white;
}

.tier-btn.settings {
    background: rgba(139, 92, 246, 0.1);
}

.tier-btn.settings:hover {
    background: rgba(139, 92, 246, 0.2);
}

@media (max-width: 768px) {
    .tier-buttons {
        flex-direction: column;
    }
    
    .tier-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 15px;
    }
    
    .tier-btn i {
        margin-right: 10px;
    }
    
    .tier-btn small {
        margin-left: auto;
    }
}
/* Humanization feedback styles */
.humanization-feedback {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.feedback-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.feedback-score.excellent {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.feedback-score.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.feedback-score.moderate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.feedback-score.minimal {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.score-value {
    font-size: 20px;
    line-height: 1;
}

.score-label {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.8;
}

.feedback-message {
    font-size: 13px;
    color: var(--text-secondary);
}
/* Copy button styles */
.copy-btn {
    background: none;
    border: none;
    color: var(--accent-secondary);
    cursor: pointer;
    font-size: 14px;
    margin-left: 8px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.copy-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    opacity: 1;
}

.copy-btn.copied {
    color: var(--success);
    opacity: 1;
}

.message-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .ai-container {
        height: auto;
        min-height: 500px;
    }
    
    .chat-container {
        height: 400px;
        max-height: 60vh;
    }
    
    .tier-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .tier-btn {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
        width: 100%;
    }
    
    .tier-btn i {
        margin-right: 10px;
    }
    
    .tier-btn span {
        flex: 1;
        text-align: left;
    }
    
    .tier-btn small {
        text-align: right;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .style-selector, .strength-selector, .complexity-selector, .punctuation-selector {
        width: 100%;
    }
    
    .input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-input {
        width: 100%;
    }
    
    .send-btn {
        width: 100%;
        height: 40px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .example-container {
        flex-direction: column;
    }
    
    /* Fix message display on mobile */
    .message {
        max-width: 95%;
    }
    
    /* Adjust copy button for better touch targets */
    .copy-btn {
        padding: 5px 10px;
        font-size: 16px;
    }
    
    /* Fix footer on mobile */
    .footer {
        padding: 10px;
    }
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.splash-logo {
    width: 80px;
    height: 80px;
    font-size: 40px;
    animation: pulse 2s infinite;
}

.splash-text {
    font-size: 2.5rem;
    margin-top: 10px;
}

.splash-tagline {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.splash-loader {
    width: 200px;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.splash-loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 4px;
    animation: loadingBar 2s ease-out forwards;
}

@keyframes loadingBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Copy button styles */
.copy-btn {
    background: none;
    border: none;
    color: var(--accent-secondary);
    cursor: pointer;
    font-size: 14px;
    margin-left: 8px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.copy-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    opacity: 1;
}

.copy-btn.copied {
    color: var(--success);
    opacity: 1;
}

.message-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Tier Options */
.tier-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.tier-options .option-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-options .option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.tier-options .option-checkbox label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .ai-container {
        height: auto;
        min-height: 500px;
    }
    
    .chat-container {
        height: 400px;
        max-height: 60vh;
    }
    
    .tier-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .tier-btn {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
        width: 100%;
    }
    
    .tier-btn i {
        margin-right: 10px;
    }
    
    .tier-btn span {
        flex: 1;
        text-align: left;
    }
    
    .tier-btn small {
        text-align: right;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .style-selector, .strength-selector, .complexity-selector, .punctuation-selector {
        width: 100%;
    }
    
    .input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-input {
        width: 100%;
    }
    
    .send-btn {
        width: 100%;
        height: 40px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .example-container {
        flex-direction: column;
    }
    
    /* Fix message display on mobile */
    .message {
        max-width: 95%;
    }
    
    /* Adjust copy button for better touch targets */
    .copy-btn {
        padding: 5px 10px;
        font-size: 16px;
    }
    
    /* Fix footer on mobile */
    .footer {
        padding: 10px;
    }
    
    .tier-options {
        justify-content: flex-start;
        padding-left: 10px;
    }
}

/* Fix for iPhone notch */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}
