/* ==================== CLEAN GRAY THEME ==================== */

:root {
    --bg-body: #f5f5f5;
    --bg-white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #eeeeee;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --accent: #333333;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 18px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    border-radius: 8px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #000;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
}

/* ==================== GIRLS GRID ==================== */
.girls-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.girl-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.girl-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.girl-image {
    position: relative;
    aspect-ratio: 3/4;
}

.girl-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.girl-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
}

.girl-badge {
    background: rgba(255,255,255,0.95);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.girl-badge.online {
    background: #22c55e;
    color: white;
}

.girl-info {
    padding: 15px;
}

.girl-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #666;
}

.girl-buttons {
    display: flex;
    gap: 8px;
}

.girl-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.girl-btn.profile {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.girl-btn.profile:hover {
    background: #e0e0e0;
}

.girl-btn.chat {
    background: #333;
    color: white;
    border: 1px solid #333;
}

.girl-btn.chat:hover {
    background: #000;
}

.girl-btn.login {
    flex: 1;
    background: #333;
    color: white;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.girl-btn.login:hover {
    background: #000;
}

/* ==================== STATS SECTION ==================== */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-box {
    background: white;
    padding: 25px 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* ==================== CHAT ==================== */
.chat-wrapper {
    position: fixed;
    inset: 0;
    padding: 70px 20px 20px;
    background: var(--bg-body);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-header {
    background: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #eee;
}

.chat-header .back {
    font-size: 1.3rem;
    color: #333;
    text-decoration: none;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.chat-header-info span {
    font-size: 0.8rem;
    color: #22c55e;
}

.chat-header .credits {
    background: #333;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: var(--bg-body);
}

.message {
    max-width: 75%;
    padding: 14px 20px;
    border-radius: 18px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.user {
    background: #333;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.girl {
    background: white;
    color: #333;
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message .sender {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.message .time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 6px;
    text-align: right;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
}

.chat-input input:focus {
    border-color: #333;
}

.chat-input button {
    width: 50px;
    height: 50px;
    border: none;
    background: #333;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.chat-input button:hover {
    background: #000;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: white;
    border-top: 1px solid var(--border);
}

.typing-indicator.show {
    display: flex;
}

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

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 0.85rem;
    color: #666;
}

.no-credits {
    text-align: center;
    padding: 15px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .girls-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .girls-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-box {
        padding: 20px 35px;
        min-width: 150px;
    }
    
    .header {
        padding: 12px 20px;
    }
    
    .header nav {
        gap: 12px;
    }
    
    .girl-buttons {
        flex-direction: column;
        gap: 8px;
    }
}
