:root {
    /* Светлая тема Maxitet (по умолчанию) */
    --bg-color: #ffffff;
    --text-color: #000000;
    --hint-color: #6b6b7b;
    --link-color: #0055FF;
    --primary-color: #0055FF;
    --primary-text: #ffffff;
    --secondary-bg: #f5f6f8;
    --accent-color: #ccff00;
    --border-color: #e2e4e9;
}

.theme-dark {
    /* Темная тема Maxitet */
    --bg-color: #121216;
    --text-color: #ffffff;
    --hint-color: #8f8f9d;
    --link-color: #0055FF;
    --primary-color: #0055FF;
    --primary-text: #ffffff;
    --secondary-bg: #1c1c24;
    --accent-color: #ccff00;
    --border-color: #2d2d3a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* Prevent scrolling for the swipe view */
    -webkit-tap-highlight-color: transparent;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 1px solid var(--secondary-bg);
}
.icon-btn {
    background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-color);
}

/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 10px;
}

/* Bottom Nav */
.bottom-nav {
    height: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--secondary-bg);
    border-top: 1px solid rgba(0,0,0,0.1);
}
.bottom-nav button {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: var(--hint-color);
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s;
}
.bottom-nav button.active {
    color: var(--primary-color);
}

/* Tinder Cards */
.tinder-cards {
    position: relative;
    width: 100%;
    height: calc(100vh - 220px); /* Adjust based on header/nav/buttons */
    max-width: 400px;
    margin: 0 auto;
}
.tinder-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    will-change: transform;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}
.tinder-card.moving {
    transition: none;
}
.card-img {
    width: 100%;
    height: 65%;
    object-fit: cover;
    pointer-events: none;
}
.card-info {
    padding: 15px;
    flex: 1;
    background: linear-gradient(to top, var(--secondary-bg) 0%, var(--bg-color) 100%);
}
.card-info h2 { font-size: 22px; margin-bottom: 5px; }
.card-info p { font-size: 14px; color: var(--hint-color); margin-bottom: 5px; }
.card-info .bio { margin-top: 10px; font-size: 15px; color: var(--text-color); }

/* Swipe Actions */
.swipe-actions {
    display: flex;
    justify-content: space-evenly;
    margin-top: 15px;
}
.btn-circle {
    width: 60px; height: 60px; border-radius: 50%;
    border: none; font-size: 24px; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background: var(--bg-color);
    color: var(--text-color);
}
.btn-circle.like { color: #4cd964; }
.btn-circle.dislike { color: #ff3b30; }

/* Forms & Profile */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; color: var(--hint-color); margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px; border-radius: 16px;
    border: 1px solid var(--border-color); background: var(--bg-color);
    color: var(--text-color); font-size: 16px; transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary-color);
}
.form-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236b6b7b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}
.avatar-section { text-align: center; margin-bottom: 20px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 3px solid var(--primary-color); }
.small-text { font-size: 12px; color: var(--hint-color); margin-top: 5px; }
.btn { 
    background: var(--secondary-bg); color: var(--text-color); 
    border: none; padding: 14px 24px; border-radius: 30px; font-weight: 600; width: 100%; margin-top: 10px;
    transition: opacity 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.primary-btn { background: var(--primary-color); color: var(--primary-text); }
.accent-btn { background: var(--accent-color); color: #000000; }

/* Likes Grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.like-card { 
    background: var(--secondary-bg); border-radius: 12px; overflow: hidden; position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.like-card.mutual { border: 2px solid #ff2d55; }
.like-avatar { width: 100%; height: 150px; object-fit: cover; }
.like-info { padding: 8px; font-size: 14px; text-align: center; }
.badge { display: block; background: #ff2d55; color: white; font-size: 11px; padding: 3px; border-radius: 5px; margin-top: 5px; }

/* Loaders & Misc */
.empty-state { text-align: center; margin-top: 50px; color: var(--hint-color); }
.filters-panel { background: var(--bg-color); border: 1px solid var(--secondary-bg); padding: 15px; border-radius: 12px; margin-bottom: 15px; }
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--secondary-bg); border-top: 4px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.theme-switcher { margin-bottom: 15px; background: var(--secondary-bg); padding: 10px; border-radius: 8px; }

/* Warnings & Toggles */
.warning-banner { background: #ff3b3020; border: 1px solid #ff3b30; color: #ff3b30; padding: 15px; border-radius: 12px; margin-bottom: 15px; }
.warning-banner ul { margin-left: 20px; margin-top: 5px; margin-bottom: 5px; }
.has-error input, .has-error textarea { border: 2px solid #ff3b30 !important; }
.btn-circle.report { color: #ff9500; font-size: 20px; }

.toggle-group { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 15px; background: var(--secondary-bg); border-radius: 12px; }
.switch-label { font-size: 14px; font-weight: bold; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Mutual Like Overlay */
.mutual-overlay, .verification-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
}
.mutual-overlay { background: rgba(0,0,0,0.85); color: white; backdrop-filter: blur(10px); }

.verification-content {
    background: var(--secondary-bg);
    padding: 30px 20px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.verification-content h2 { margin-bottom: 15px; color: var(--primary-color); }
.cooldown-box { margin-top: 20px; background: #ff3b3020; padding: 15px; border-radius: 12px; color: #ff3b30; }

.mutual-content {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.heart-pulse {
    font-size: 100px;
    margin-bottom: 20px;
    animation: heartbeat 1.2s infinite;
    text-shadow: 0 0 40px rgba(255, 45, 85, 0.8);
}
.mutual-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff2d55, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mutual-content p {
    font-size: 16px;
    opacity: 0.8;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
