:root {
    --bg-color: #050505;
    --panel-bg: #121212;
    --panel-border: #2a2a2a;
    --primary-red: #ff3b3b;
    --primary-red-hover: #ff1f1f;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --glow-color: rgba(255, 59, 59, 0.3);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.8rem;
}

.pro-badge {
    background: linear-gradient(135deg, var(--primary-red), #ff0000);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 10px var(--glow-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 0 15px var(--glow-color);
}

.btn-primary:hover {
    background: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--glow-color);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: rgba(255, 59, 59, 0.1);
}

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

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#username {
    color: var(--text-muted);
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Hero */
.hero {
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 1s ease-out;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--primary-red);
    -webkit-text-fill-color: var(--primary-red);
    text-shadow: 0 0 20px var(--glow-color);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Panels */
.panels-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 500px;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    border-color: var(--primary-red);
    box-shadow: 0 0 20px rgba(255, 59, 59, 0.05);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 15px;
}

.panel-header h3 {
    font-weight: 600;
    color: var(--text-main);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

/* Chat */
.chat-window {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
}

.message.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.message.user {
    align-self: flex-end;
    background: var(--primary-red);
    color: white;
    border-bottom-right-radius: 2px;
}

.message.ai {
    align-self: flex-start;
    background: #2a2a2a;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    border: 1px solid var(--panel-border);
}

/* Image Gen */
.image-preview {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 300px;
    position: relative;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease;
}

.placeholder-text {
    color: var(--text-muted);
    font-style: italic;
}

/* Inputs */
.input-area {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    padding: 12px 15px;
    border-radius: 10px;
    color: white;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary-red);
}

.btn-icon {
    background: var(--primary-red);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--primary-red-hover);
    transform: scale(1.05);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .panels-container {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}
