:root {
    --bg-primary: #0a0e27;
    --bg-card: #1a1f3a;
    --neon-blue: #00d4ff;
    --neon-red: #ff0055;
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --border-default: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(138, 43, 226, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 0, 85, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

#root {
    position: relative;
    z-index: 1;
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.6); }
}

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

@keyframes breathe {
    0%, 100% { border-color: rgba(0, 212, 255, 0.4); }
    50% { border-color: rgba(0, 212, 255, 1); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-in-1 { animation: fadeInUp 0.5s ease 0.1s forwards; opacity: 0; }
.animate-fade-in-2 { animation: fadeInUp 0.5s ease 0.2s forwards; opacity: 0; }
.animate-fade-in-3 { animation: fadeInUp 0.5s ease 0.3s forwards; opacity: 0; }
.animate-fade-in-4 { animation: fadeInUp 0.5s ease 0.4s forwards; opacity: 0; }
.animate-fade-in-5 { animation: fadeInUp 0.5s ease 0.5s forwards; opacity: 0; }

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.trait-btn-active {
    background: var(--neon-blue) !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    border-color: var(--neon-blue) !important;
}

.drop-zone-active {
    animation: breathe 1.5s ease-in-out infinite;
    background: rgba(0, 212, 255, 0.05) !important;
}

.generated-image {
    animation: fadeScale 0.5s ease forwards;
}

.toast {
    animation: slideInRight 0.3s ease forwards;
}

.glow-text {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
}

.neon-border {
    border: 2px dashed var(--neon-blue);
    transition: all 0.3s ease;
}

.neon-border:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.7);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #2a2a3a;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.history-thumb {
    transition: all 0.3s ease;
    border: 1px solid var(--border-default);
}

.history-thumb:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

@media (max-width: 768px) {
    .two-col {
        flex-direction: column !important;
    }
}