/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #2a2a2a 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 14px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.site-header .logo {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.site-header nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.site-header nav a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.site-header nav a:hover {
    color: white;
    text-decoration: underline;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    background: white;
    padding: 40px 50px;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

.main-content h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #333;
}

.main-content .subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
}

.main-content h2 {
    font-size: 20px;
    margin: 28px 0 12px;
    color: #333;
}

.main-content h3 {
    font-size: 16px;
    margin: 20px 0 8px;
    color: #444;
}

.main-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 12px;
}

.main-content ul,
.main-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.main-content ul li,
.main-content ol li {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 6px;
}

.main-content .highlight-box {
    background: #f5f6ff;
    border-left: 4px solid #667eea;
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
}

.main-content .highlight-box strong {
    color: #667eea;
}

/* ===== LAYOUT (главная) ===== */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.container {
    background: white;
    width: 100%;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== ФОРМА ===== */
h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.price-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.price-box .price {
    font-size: 20px;
    font-weight: bold;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0 4px;
    color: #333;
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #667eea;
    outline: none;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

.footer-note {
    text-align: center;
    margin-top: 15px;
    color: #999;
    font-size: 12px;
}

.label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 4px;
}

.label-row label {
    margin: 0;
}

.help-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    user-select: none;
}

.help-icon:hover {
    background: #667eea;
    color: white;
}

.help-tooltip {
    display: none;
    position: absolute;
    top: 22px;
    left: 0;
    background: #333;
    color: white;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 8px;
    width: 220px;
    line-height: 1.4;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.help-icon.open .help-tooltip {
    display: block;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px 0;
}

.tag-btn {
    padding: 5px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    user-select: none;
    white-space: nowrap;
}

.tag-btn:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.tag-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.selected-tags {
    margin: 6px 0 4px 0;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    min-height: 30px;
}

.selected-tags strong {
    color: #333;
}

.vocal-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.vocal-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
}

.vocal-btn:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.vocal-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* ===== SIDEBAR ===== */
.sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c4c9f5 transparent;
}

.sidebar-col::-webkit-scrollbar {
    width: 6px;
}

.sidebar-col::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-col::-webkit-scrollbar-thumb {
    background: #c4c9f5;
    border-radius: 10px;
}

.sidebar-col::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

.sidebar {
    background: white;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 24px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-header h3 {
    color: #333;
    font-size: 16px;
}

.history-header .warning {
    font-size: 11px;
    color: #999;
    background: #fff3cd;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #ffc107;
    white-space: nowrap;
}

.clear-btn {
    padding: 6px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.clear-btn:hover {
    opacity: 0.8;
}

.clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.history-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    margin: 8px 0;
    background: #f9f9f9;
    overflow: hidden;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    user-select: none;
}

.history-item-header:hover {
    background: #f0f0ff;
}

.history-item .title {
    font-weight: bold;
    font-size: 14px;
}

.history-item .date {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.history-item-chevron {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.history-item.open .history-item-chevron {
    transform: rotate(180deg);
}

.history-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.history-item.open .history-item-body {
    max-height: 400px;
}

.history-item-body-inner {
    padding: 0 12px 12px;
}

.empty-history {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.history-item .variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.history-item .variant {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.history-item .variant audio {
    width: 100%;
}

.download-btn {
    display: inline-block;
    padding: 5px 14px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.download-btn:hover {
    opacity: 0.9;
}

/* ===== ОТЗЫВЫ ===== */
.reviews-header {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.review-item {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fafafa;
}

.review-item .review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.review-item .review-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.review-item .review-stars {
    font-size: 12px;
    color: #ffa726;
}

.review-item .review-text {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.write-review-btn {
    width: 100%;
    padding: 10px;
    background: white;
    border: 2px dashed #667eea;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    margin-top: 6px;
    transition: all 0.2s;
}

.write-review-btn:hover {
    background: #f0f0ff;
}

.review-form {
    display: none;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
}

.review-form.open {
    display: block;
}

.review-form .stars-pick {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.review-form .star-btn {
    font-size: 22px;
    cursor: pointer;
    color: #ddd;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.review-form .star-btn.active {
    color: #ffa726;
}

.review-form input,
.review-form textarea {
    margin-bottom: 8px;
    font-size: 13px;
}

.review-form textarea {
    min-height: 90px;
}

.review-form .submit-review-btn {
    width: 100%;
    padding: 9px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.review-form .submit-review-btn:hover {
    opacity: 0.9;
}

.review-thanks {
    display: none;
    text-align: center;
    padding: 10px;
    color: #4CAF50;
    font-size: 13px;
    font-weight: 600;
}

/* ===== ДЕМО-КАРТОЧКИ ===== */
.demo-section {
    max-width: 1100px;
    margin: 20px auto 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 15px;
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.demo-header .badge {
    font-size: 12px;
    color: #999;
    background: #f0f0ff;
    padding: 4px 12px;
    border-radius: 12px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.demo-card {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 12px 14px;
    background: #fafafa;
    transition: all 0.2s;
}

.demo-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.demo-card .info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.demo-card .info .icon {
    font-size: 22px;
}

.demo-card .info .text {
    flex: 1;
    min-width: 0;
}

.demo-card .info .text .name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-card .info .text .meta {
    font-size: 11px;
    color: #999;
}

.demo-card audio {
    width: 100%;
    height: 30px;
}

.demo-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: #999;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding: 40px 30px 30px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-cols h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

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

.footer-cols ul li {
    margin-bottom: 6px;
}

.footer-cols a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

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

.payments-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.payments-block .label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.payment-logos {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
    cursor: default;
}

.payment-logo:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.payment-logo svg {
    height: 24px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.payment-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.payment-logo.sbp:hover {
    background: rgba(0, 85, 165, 0.2);
    border-color: rgba(0, 85, 165, 0.3);
}

.payment-logo.sbp .payment-label {
    color: #4a90d9;
}

.payment-logo.mir:hover {
    background: rgba(48, 87, 158, 0.2);
    border-color: rgba(48, 87, 158, 0.3);
}

.payment-logo.mir .payment-label {
    color: #6b8cbe;
}

.copyright {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar-col {
        position: static;
        max-height: none;
        order: 2;
    }

    .container {
        order: 1;
    }

    .site-footer .footer-cols {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .main-content {
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .payments-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-logos {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .vocal-group {
        flex-direction: column;
    }

    .payments-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer {
        padding: 24px 16px 20px;
    }

    .payment-logo {
        padding: 4px 10px 4px 8px;
    }

    .payment-logo svg {
        height: 20px;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .main-content {
        padding: 16px;
    }

    .main-content h1 {
        font-size: 22px;
    }
}