/**
 * Основные стили для сайта Fonomatika
 * music.fonomatika.ru
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a6fd8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-left: 10px;
}

.logo h1 a {
    color: inherit;
    text-decoration: none;
}

.tagline {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 10px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: #f8f9fa;
    color: #667eea;
}

.login-btn {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.login-btn:hover {
    background: #5a6fd8;
    color: white;
}

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

.user-info {
    font-size: 14px;
    color: #2c3e50;
}

.subscription-badge {
    background: #e1e8ed;
    color: #657786;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.subscription-badge.subscription-business {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.subscription-badge.subscription-business_expired {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.plan-temporary {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    border: 1px solid #ffeaa7;
}

.subscription-badge.subscription-premium {
    background: #f39c12;
    color: white;
}

.logout-link {
    color: #7f8c8d;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Main Content */
.main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    color: #fff;
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Sections */
section {
    padding: 60px 0;
}

section h3 {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: center;
}

/* Popular Playlists */
.popular-playlists {
    background: #f8f9fa;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.playlist-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.playlist-image {
    height: 180px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.placeholder-image {
    color: white;
    font-size: 40px;
    opacity: 0.7;
}

.premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.playlist-info {
    padding: 20px;
}

.playlist-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.playlist-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.playlist-description {
    font-size: 14px;
    color: #657786;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-actions {
    padding: 0 20px 20px;
}

/* Sections Grid */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.section-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.section-image {
    height: 160px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.section-placeholder {
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    color: white;
    font-size: 40px;
    opacity: 0.8;
}

.section-info {
    padding: 20px;
}

.section-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.section-stats {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.section-description {
    font-size: 14px;
    color: #657786;
    line-height: 1.4;
    margin-bottom: 15px;
}

.section-actions {
    padding: 0 20px 20px;
}

/* Subscription Plans */
.subscription-plans {
    background: #f8f9fa;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.plans-grid.two-plans {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
}

.plan-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.plan-card.featured {
    border: 2px solid #667eea;
    transform: scale(1.05);
}

.plan-card.featured::before {
    content: "Популярный";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.plan-card.current-plan {
    border: 2px solid #27ae60;
}

.plan-card.current-plan::before {
    content: "Текущий план";
    background: #27ae60;
}

.plan-header h4 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

.plan-price span {
    font-size: 16px;
    color: #7f8c8d;
    font-weight: normal;
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
}

.plan-features li {
    padding: 8px 0;
    color: #2c3e50;
    position: relative;
    padding-left: 25px;
}

.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: 600;
}

.plan-action button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.plan-action button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.plan-badge {
    background: #667eea;
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    display: inline-block;
    font-weight: 600;
}

.current-plan-label {
    color: #27ae60;
    font-weight: 600;
    font-size: 16px;
}

/* Custom Order Section */
.custom-order-section {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.custom-order-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.custom-order-content {
    flex: 1;
}

.custom-order-content h4 {
    font-size: 28px;
    margin-bottom: 15px;
    color: white;
}

.custom-order-content p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}

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

.custom-features li {
    position: relative;
    padding: 8px 0 8px 25px;
    opacity: 0.9;
}

.custom-features li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: #f1c40f;
    font-weight: 600;
}

.custom-order-action {
    text-align: center;
    flex-shrink: 0;
}

.custom-price {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

@media (max-width: 768px) {
    .plans-grid.two-plans {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .custom-order-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

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

.footer-section h5 {
    font-size: 18px;
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-contacts li {
    margin-bottom: 8px;
    color: #bdc3c7;
}

.footer-contacts a {
    color: #3498db;
}

.footer-bottom {
    /*border-top: 1px solid #34495e;*/
    padding-top: 20px;
    text-align: center;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }

    .main-nav {
        gap: 15px;
    }

    .main {
        margin-top: 100px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    section h3 {
        font-size: 28px;
    }

    .playlists-grid,
    .sections-grid {
        grid-template-columns: 1fr;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-card.featured {
        transform: none;
    }

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

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

    .hero {
        padding: 60px 0;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    section {
        padding: 40px 0;
    }

    section h3 {
        font-size: 24px;
    }

    .plan-card {
        padding: 20px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-success .notification-message {
    color: #065f46;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-error .notification-message {
    color: #991b1b;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-warning .notification-message {
    color: #92400e;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-info .notification-message {
    color: #1e40af;
}

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

.notification.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Unauthorized User CTA Styles */
.unauthorized-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.unauthorized-cta .cta-content h2 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.unauthorized-cta .cta-content p {
    color: #f0f0f0;
    font-size: 16px;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.unauthorized-cta .cta-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
}

/* Preview Locked Overlay */
.play-overlay.preview-locked {
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-overlay.preview-locked:hover {
    background: rgba(0, 0, 0, 0.85);
}

.play-overlay.preview-locked .lock-icon {
    font-size: 48px;
    color: #ffffff;
}

/* Unauthorized Track List View */
.tracks-list.unauthorized-view .track-row {
    opacity: 0.85;
    cursor: default;
}

.tracks-list.unauthorized-view .track-row:hover {
    background-color: #f9f9f9;
}

.locked-track-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.locked-track-btn:hover {
    opacity: 0.7;
}

/* Icon Styles - используем SVG из reset.css */