﻿/* Базовые стили */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --dark-bg: #0a0f1a;
    --dark-surface: #111827;
    --dark-border: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
}

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

.dark {
    background-color: var(--dark-bg);
    color: var(--text-primary);
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Шапка */
.app-header {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    margin-right: 8px;
    font-size: 1.8rem;
}

.logo-accent {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: 3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

    .nav-link:hover {
        color: var(--text-primary);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: var(--transition);
    }

    .nav-link:hover::after {
        width: 100%;
    }

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Основной контент */
.app-main {
    flex: 1;
    padding: 2rem 0;
}

/* Подвал */
.app-footer {
    background-color: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    gap: 0.5rem;
}

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

    .btn-primary:hover {
        background-color: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

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

    .btn-outline:hover {
        background-color: rgba(99, 102, 241, 0.1);
        transform: translateY(-2px);
    }

.btn-secondary {
    background-color: var(--dark-surface);
    color: var(--text-primary);
}

    .btn-secondary:hover {
        background-color: #1f2937;
    }

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Карточки */
.card {
    background-color: var(--dark-surface);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
    padding: 1.5rem;
    transition: var(--transition);
}

    .card:hover {
        border-color: var(--primary-color);
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }

.card-header {
    border-bottom: 1px solid var(--dark-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .form-control::placeholder {
        color: var(--text-muted);
    }

.form-text {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Сообщения */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* Утилиты */
.text-center {
    text-align: center;
}

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

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

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

.mt-4 {
    margin-top: 2rem;
}

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

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

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

.mb-4 {
    margin-bottom: 2rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        margin-left: 0;
        gap: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .card {
        padding: 1rem;
    }
}

/* Добавляем в конец файла site.css */

/* Анимации */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Утилиты */
.w-100 {
    width: 100%;
}

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

.text-muted {
    color: var(--text-muted);
}

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

.small {
    font-size: 0.875rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .subscriptions-header h1 {
        font-size: 1.8rem;
    }

    .plan-header h3 {
        font-size: 1.3rem;
    }

    .price-amount {
        font-size: 2rem;
    }
}

/* Дропдаун пользователя */
.user-dropdown {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

    .user-menu-toggle:hover {
        border-color: var(--primary-color);
        background-color: rgba(99, 102, 241, 0.05);
    }

.user-email {
    font-size: 0.9rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--dark-border);
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background-color: rgba(99, 102, 241, 0.05);
        color: var(--primary-color);
    }

.dropdown-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--dark-border);
    margin: 0.25rem 0;
}

/* Ссылки в футере */
.footer-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

    .footer-link:hover {
        color: var(--text-primary);
    }

/* Анимация для дропдауна */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для шапки */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 1rem;
    }

    .auth-buttons {
        margin-left: auto;
    }

    .user-email {
        max-width: 100px;
    }
}

/* Футер */
.app-footer {
    background-color: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.footer-tagline {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.footer-apps {
    margin-top: 1rem;
}

.app-link {
    display: inline-block;
    transition: var(--transition);
}

.play-store-badge {
    height: 50px;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.app-link:hover .play-store-badge {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-list li {
        margin-bottom: 0.75rem;
    }

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block;
    padding: 0.25rem 0;
    position: relative;
}

    .footer-link:hover {
        color: var(--text-primary);
        transform: translateX(5px);
    }

    .footer-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--primary-color);
        transition: var(--transition);
    }

    .footer-link:hover::before {
        width: 100%;
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-border);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
    max-width: 400px;
}

.footer-social {
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

    .social-link:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

.social-icon {
    font-size: 1.2rem;
}

/* Обновленная шапка - убираем дропдаун */
.btn-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin-right: 0.75rem;
}

    .btn-profile:hover {
        background-color: rgba(99, 102, 241, 0.2);
        transform: translateY(-1px);
    }

.profile-icon {
    font-size: 1.2rem;
}

.profile-email {
    font-size: 0.9rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Убираем старые стили дропдауна */
.user-dropdown,
.user-dropdown-menu,
.dropdown-item,
.dropdown-divider {
    display: none;
}

/* Адаптивность футера */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

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

    .footer-disclaimer {
        margin: 0 auto;
    }

    .play-store-badge {
        height: 40px;
    }

    /* Адаптивность шапки для мобильных */
    .navbar {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .auth-buttons {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .btn-profile {
        padding: 0.4rem 0.8rem;
        margin-right: 0.5rem;
    }

    .profile-email {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .btn-profile {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .profile-email {
        max-width: none;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}