/* Братская Любовь - Стили в духе Macan */

:root {
    --primary-color: #ff4444;
    --secondary-color: #ff6b6b;
    --accent-color: #ff8e8e;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #333333;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --gradient: linear-gradient(135deg, #ff4444, #ff6b6b, #ff8e8e);
    --shadow: 0 4px 20px rgba(255, 68, 68, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    position: relative;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--dark-bg);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    padding: 2rem 0;
}

.screen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

/* Loading Screen */
.loading-container {
    text-align: center;
    max-width: 300px;
    padding: 2rem;
}

.fire-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loading-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    animation: loading 3s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Auth Screen */
.auth-container {
    text-align: center;
    max-width: 350px;
    padding: 2rem;
    margin: auto;
    width: 100%;
}

.auth-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: calc(var(--border-radius) - 4px);
    transition: var(--transition);
    font-weight: 500;
}

.auth-tab.active {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Auth Forms */
.auth-form {
    display: none;
    margin-bottom: 2rem;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: var(--dark-bg);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 68, 68, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Profile Setup */
.profile-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--text-secondary);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--darker-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.photo-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
}

.photo-upload:hover {
    border-color: var(--primary-color);
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-preview {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.photo-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

/* Main App */
#main-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--dark-bg);
}

/* Navigation */
.nav {
    display: flex;
    background: var(--darker-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
}

.nav-btn.active {
    color: var(--primary-color);
    background: rgba(255, 68, 68, 0.1);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-btn span:last-child {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tab Content */
.tab-content {
    flex: 1;
    display: none;
    overflow-y: auto;
    padding: 1rem;
}

.tab-content.active {
    display: block;
}

/* Swipe Card */
.swipe-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.swipe-card {
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 350px;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card-content {
    position: relative;
}

.card-photos {
    height: 400px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.photo-placeholder {
    font-size: 4rem;
    color: var(--text-muted);
}

.card-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 1.5rem;
}

.card-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--darker-bg);
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.dislike {
    background: var(--border-color);
    color: var(--text-muted);
}

.action-btn.dislike:hover {
    background: var(--warning-color);
    color: white;
    transform: scale(1.1);
}

.action-btn.like {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow);
}

.action-btn.like:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 68, 68, 0.4);
}

.no-cards {
    text-align: center;
    padding: 2rem;
}

.no-cards h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.no-cards p {
    color: var(--text-secondary);
}

/* Matches */
.matches-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-item {
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.match-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.match-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.match-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.match-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Profile */
.profile-info {
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.profile-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.logout-btn {
    color: var(--warning-color) !important;
    border-color: var(--warning-color) !important;
}

.logout-btn:hover {
    background: var(--warning-color) !important;
    color: white !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: var(--transition);
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    max-width: 300px;
    width: 90%;
    box-shadow: var(--shadow);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.match-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .profile-container,
    .auth-container {
        padding: 1rem;
    }
    
    .swipe-card {
        margin: 0 1rem 2rem;
    }
    
    .card-photos {
        height: 300px;
    }
    
    .nav-btn span:last-child {
        display: none;
    }
    
    .nav-btn {
        padding: 0.5rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.slide-out {
    animation: slideOut 0.3s ease-out;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
