/* --- Variables --- */

:root {
    /* Colors */
    --color-dark-bg: #1a202c;
    --color-main-bg: #0a0e17;
    --color-card-bg: rgba(26, 32, 44, 0.8);
    --color-accent-blue: #3f51b5;
    --color-accent-light-blue: #00bcd4;
    --color-text-dark: #2d3748;
    --color-text-light: #e2e8f0;
    --color-border: rgba(255, 255, 255, 0.1);
    /* Neon effects */
    --neon-primary: #0ff0fc;
    --neon-secondary: #ff2d75;
    --neon-accent: #f0f;
    --dark-space: #0a0e17;
    --cosmic-purple: #4d2b8c;
    /* Sizes */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}


/* --- Base Styles --- */

* {
    box-sizing: border-box;
    transition: var(--transition);
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-main-bg);
    color: var(--color-text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-top: 0;
    line-height: 1.2;
    text-align: center;
}

.container {
    width: 100%;
    margin: 0 auto;
}


/* --- Main Layout --- */

.main-block {
    display: flex;
    width: 100vw;
}

.neo-content {
    margin: 0 auto;
    padding: 1vw;
    width: 80vw;
}

.neo-sidebar {
    display: flex;
    flex-direction: column;
    width: 19vw;
    padding: 1vw;
    gap: 1.5vw;
    position: relative;
    padding-top: 2.1vw;
}


/* --- Banner Styles --- */

.banner-container {
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    justify-self: center;
    width: 100vw;
    margin-top: 1vw;
}

.modern-banner {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.banner-link {
    display: block;
    width: 98%;
    height: 100%;
    text-decoration: none;
    color: white;
    position: relative;
}

.banner-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner-video,
.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.banner-content_two {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-description {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}


/* --- Poll Styles --- */

.poll-container {
    background: var(--color-card-bg);
    border-radius: var(--border-radius);
    padding: 2vw;
    padding-top: 1vw;
    border: 1px solid var(--color-border);
    margin-top: 1vw;
    text-align: -webkit-center;
}

.poll-header {
    text-align: center;
    margin-bottom: 1vw;
}

.poll-header h2 {
    color: var(--neon-primary);
    font-size: 1.8vw;
    margin-bottom: 0.5vw;
}

.poll-total-votes {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1vw;
}

.poll-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3vw;
    margin: 2vw 0;
    width: 80vw;
    justify-self: center;
}

.car-result {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.car-image {
    width: 100%;
}

.car-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.car-name {
    font-size: 1.5vw;
    font-weight: bold;
    margin: 0.5vw;
    text-align: center;
    color: var(--color-text-light);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5vw 0;
}

.progress-fill {
    height: 100%;
    background: var(--neon-primary);
    transition: width 1s ease;
}

.car-stats {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5vw;
}

.car-percentage {
    font-size: 1.2vw;
    font-weight: bold;
    color: var(--neon-primary);
}

.car-votes {
    font-size: 0.9vw;
    color: rgba(255, 255, 255, 0.7);
}

.vs-circle {
    background: var(--neon-primary);
    color: var(--color-dark-bg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 15px var(--neon-primary);
}


/* --- Poll Vote Form --- */

.poll-vote-form {
    background: rgba(26, 32, 44, 0.8);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 0rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.vote-title {
    color: var(--neon-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.vote-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.vote-option {
    position: relative;
}

.vote-input {
    position: absolute;
    opacity: 0;
}

.vote-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vote-label:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vote-input:checked+.vote-label {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.3);
}

.vote-radio {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.vote-input:checked+.vote-label .vote-radio {
    border-color: var(--neon-primary);
    background: var(--neon-primary);
    box-shadow: 0 0 10px var(--neon-primary);
}

.vote-input:checked+.vote-label .vote-radio::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.vote-text {
    font-size: 1.1rem;
    font-weight: 500;
    flex-grow: 1;
}

.vote-car-image {
    width: 60px;
    height: 40px;
    margin-left: 1rem;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.vote-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--neon-primary), #00bcd4);
    color: var(--color-dark-bg);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vote-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}


/* --- Poll Messages --- */

.poll-message {
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    border-left: 5px solid;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.info-message {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
}

.message-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.success-message .message-icon {
    color: #28a745;
}

.info-message .message-icon {
    color: #17a2b8;
}

.message-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.message-content p {
    opacity: 0.8;
    margin: 0;
}


/* --- Comments Section --- */

.comments-section {
    margin-top: 2vw;
    padding: 2vw;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.comments-title {
    font-size: 1.8vw;
    color: var(--neon-primary);
    text-align: center;
    margin-bottom: 2vw;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: rgb(0, 0, 0);
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
}

.comment-form button {
    background: var(--neon-primary);
    color: var(--color-dark-bg);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.comment-form button:hover {
    background: var(--neon-secondary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 45, 117, 0.5);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    padding: 0.5rem;
    background: rgba(26, 32, 44, 0.6);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.comment:hover {
    border-color: var(--neon-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

.comment-avatar {
    width: 6rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    border: 1px solid var(--neon-primary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 600;
    color: var(--neon-primary);
    margin-bottom: 0.3rem;
}

.comment-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.comment-content {
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.reply-btn {
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-primary);
    border: 1px solid var(--neon-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reply-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.replies {
    margin-top: 0.5rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border: 1px solid var(--neon-primary);
    display: none;
    width: 70%;
}

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

.no-comments {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}


/* --- Sidebar Promo --- */

.sidebar-promo {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #1a2230, #0e131f);
    height: 25vw;
}

.sidebar-promo:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 255, 255, 0.3);
    border-color: var(--neon-primary);
}

.sidebar-promo-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.sidebar-promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sidebar-promo:hover .sidebar-promo-img {
    transform: scale(1.05);
}

.sidebar-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 14, 23, 0.9) 0%, transparent 50%);
    z-index: 2;
}

.sidebar-promo-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5vw;
    z-index: 3;
    background: linear-gradient(to top, rgba(10, 14, 23, 0.9) 0%, transparent 100%);
}

.sidebar-promo-title {
    font-size: 1.2vw;
    margin-bottom: 0.8vw;
    color: var(--neon-primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.sidebar-promo-desc {
    font-size: 0.9vw;
    line-height: 1.4;
    margin-bottom: 1.2vw;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-promo-action {
    display: inline-flex;
    align-items: center;
    padding: 0.6vw 1vw;
    background: rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    border: 1px solid var(--neon-primary);
    color: white;
    font-size: 0.8vw;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-promo-action:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.sidebar-promo-action-icon {
    width: 1vw;
    height: 1vw;
    margin-left: 0.5vw;
    stroke: var(--neon-primary);
    transition: transform 0.3s ease;
}

.sidebar-promo-action:hover .sidebar-promo-action-icon {
    transform: translateX(3px);
}

.form-control:focus {
    color: black;
}


/* --- Animations --- */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}


/* --- Responsive --- */

@media (max-width: 900px) {
    .main-block {
        flex-direction: column-reverse;
    }
    .neo-content {
        width: 98vw;
    }
    .neo-sidebar {
        width: 99vw;
        flex-direction: row;
        padding-top: 1vw;
    }
    .sidebar-promo {
        min-width: 80%;
        height: 200px;
    }
    .sidebar-promo-title {
        font-size: 16px;
    }
    .sidebar-promo-desc {
        font-size: 12px;
    }
    .sidebar-promo-action {
        font-size: 12px;
        padding: 8px 15px;
    }
    .sidebar-promo-action-icon {
        width: 12px;
        height: 12px;
    }
    .banner-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 0;
    }
    .modern-banner {
        height: auto;
        width: 100%;
        position: relative;
        overflow: hidden;
        margin-bottom: 2vw;
    }
    .banner-link {
        width: 100%;
        height: 100%;
    }
    .banner-media {
        width: 100%;
        height: 100%;
    }
    .banner-content_two {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin-top: 7vw;
    }
    .banner-title {
        font-size: 0.9rem;
        margin-bottom: 2vw;
    }
    .banner-description {
        font-size: 0.7rem;
        margin-bottom: 1vw;
    }
    .vs-circle {
        width: 13vw;
        height: 13vw;
        font-size: 4.2vw;
    }
    .poll-vote-form h3 {
        margin-bottom: 3vw;
    }
    .poll-card h3 {
        margin-bottom: 0;
    }
    .poll-car h4 {
        height: auto;
    }
    .car-name {
        font-size: 18px;
        width: 75vw;
    }
    .progress-stats {
        font-size: 14px;
    }
    .section-title {
        font-size: 20px;
    }
    .votes-table th,
    .votes-table td {
        padding: 10px;
        font-size: 14px;
    }
    .poll-actions {
        flex-direction: column;
        gap: 15px;
    }
    .admin-btn {
        padding: 12px 20px;
        justify-content: center;
    }
    .comments-section {
        padding: 5vw;
    }
    .comments-title {
        font-size: 20px;
    }
    .comment-avatar {
        width: 75px;
        height: 40px;
    }
    .comment-author {
        font-size: 16px;
    }
    .comment-date {
        font-size: 12px;
    }
    .comment-body {
        font-size: 14px;
    }
    .reply-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    .no-comments {
        font-size: 14px;
    }
}


/* Стиль для текстового поля */

.form-control {
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--color-text-light);
    /* Цвет вводимого текста */
    padding: 1rem;
    width: 100%;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}


/* Стиль для плейсхолдера */

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    /* Полупрозрачный белый */
    opacity: 1;
    /* Для полной видимости в Firefox */
}


/* Стиль при фокусе */

.form-control:focus {
    outline: none;
    border-color: var(--neon-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}


/* Стиль плейсхолдера при фокусе */

.form-control::placeholder {
    color: var(--neon-primary);
    opacity: 0.7;
}

.add-comment-form .form-control,
.reply-form .form-control {
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1vw;
    color: white;
    font-size: 1vw;
    resize: vertical;
    transition: all 0.3s ease;
}

.add-comment-form .form-control,
.reply-form .form-control {
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1vw;
    color: white;
    font-size: 1vw;
    resize: vertical;
    transition: all 0.3s ease;
}

.add-comment-form .form-control:focus,
.reply-form .form-control:focus {
    outline: none;
    border-color: var(--neon-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.form-control {
    background-color: rgba(255, 255, 255, 0);
    color: white;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0);
}

.comment-form textarea {
    color: rgb(255, 255, 255);
}

.poll-car {
    width: 1vw;
}


/* Дополнительные стили для исправления отображения */

.poll-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.poll-card {
    background: var(--color-card-bg);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.poll-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
}

.poll-title {
    font-size: 1.3rem;
    color: var(--neon-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.3;
}

.poll-cars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    width: 100%;
    height: auto;
}

.poll-car {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.poll-car-image {
    width: 100%;
    max-width: 150px;
    height: 100px;
    object-fit: contain;
    border-radius: var(--border-radius);
    margin-bottom: 0.8rem;
}

.car-image-placeholder {
    width: 100%;
    max-width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 0.8rem;
}

.car-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.2;
    width: 10vw;
    min-height: 3vw;
}

.wd {
    width: 20vw;
}

.vs-circle {
    background: var(--neon-primary);
    color: var(--color-dark-bg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 0 10px var(--neon-primary);
    flex-shrink: 0;
}

.poll-stats {
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.vote-btn {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.no-polls-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-polls-message p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .poll-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .poll-card {
        padding: 1rem;
        margin: 0 1rem;
    }
    .poll-cars {
        gap: 1rem;
    }
    .poll-car-image {
        max-width: 120px;
        height: 80px;
    }
    .vs-circle {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    .car-name {
        font-size: 0.9rem;
    }
}