/* Public Voting Page Styles */

.public-voting-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f7fbf5 0%, #eef5ef 50%, #f8faf6 100%);
    padding: 60px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* No Active Voting */
.no-active-voting {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 174, 65, 0.15);
}

    .no-active-voting .icon {
        margin-bottom: 30px;
    }

        .no-active-voting .icon svg {
            fill: #00ae41;
        }

    .no-active-voting h2 {
        color: #2d3091;
        font-size: 28px;
        margin-bottom: 20px;
    }

    .no-active-voting p {
        color: #666;
        font-size: 16px;
        margin-bottom: 30px;
    }

/* Voting Hero */
.voting-hero {
    text-align: center;
    color: #333;
    padding: 0px 40px;
    border-radius: 20px;
    margin-bottom: 40px;
}

    .voting-hero h1 {
        font-size: 36px;
        font-weight: 700;
        margin-bottom: 20px;
        font-family: 'Bebas Neue', sans-serif;
        letter-spacing: 1px;
    }

    .voting-hero p {
        font-size: 18px;
        margin-bottom: 10px;
        opacity: 0.95;
    }

    .voting-hero .info-text {
        font-size: 14px;
        font-style: italic;
        opacity: 0.85;
        margin-bottom: 30px;
    }

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 600;
}

    .btn-outline:hover {
        background: white;
        color: #00ae41;
    }

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.work-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

    .work-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 174, 65, 0.2);
    }

.work-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.work-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #f0f0f0;
    overflow: hidden;
}

    .work-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.no-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9f4, #e8f5e9);
}

    .no-thumbnail svg {
        fill: #00ae41;
        opacity: 0.3;
    }

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.work-card:hover .play-overlay {
    opacity: 1;
}

.work-info {
    padding: 20px;
}

    .work-info h3 {
        font-size: 18px;
        font-weight: 700;
        color: #2d3091;
        margin-bottom: 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.work-author {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.vote-buttons {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.btn-vote,
.btn-watch {
    flex: 1;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-vote {
    background: linear-gradient(135deg, #00ae41, #008c34);
    color: white;
}

    .btn-vote:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 174, 65, 0.3);
    }

.btn-watch {
    background: transparent;
}

/* Detail Page */
.public-voting-detail {
    min-height: 100vh;
    padding: 40px 0;
}

.back-link {
    margin-bottom: 30px;
}

    .back-link a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #110e60;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s;
    }

        .back-link a:hover {
            gap: 12px;
        }

    .back-link svg {
        fill: currentColor;
    }

.work-detail-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

/* Video Section */
.video-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(6, 47, 80, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

    .video-wrapper iframe,
    .video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

/* Voting Form */
.voting-form-container {
    background: linear-gradient(135deg, #f0f9f4, #dcdcdd);
    padding: 30px;
    border-radius: 16px;
}

.voting-step {
    display: none;
}

    .voting-step.active {
        display: block;
    }

.phone-display {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .phone-display p {
        margin: 0;
        font-size: 14px;
    }

    .phone-display strong {
        color: #2d3091;
    }

.btn-link {
    background: none;
    border: none;
    color: #00ae41;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.3s;
}

    .btn-link:hover {
        color: #008c34;
    }

    .btn-link:disabled {
        color: #999;
        cursor: not-allowed;
        opacity: 0.6;
    }

.resend-container {
    margin-bottom: 20px;
    text-align: center;
}

#resendTimer {
    color: #666;
    font-weight: normal;
}

.voting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

    .voting-header h2 {
        color: #2d3091;
        font-size: 24px;
        font-weight: 700;
    }

.vote-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e74c3c;
    font-weight: 600;
}

    .vote-count svg {
        fill: currentColor;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #333;
        font-weight: 600;
        font-size: 14px;
    }

.form-control {
    width: unset !important;
    height: 42px !important;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: #2d2891;
        box-shadow: 0 0 0 3px rgba(0, 174, 65, 0.1);
    }

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.recaptcha-container {
    margin: 20px 0;
}

.consent-container {
    margin: 20px 0;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

    .consent-label input[type="checkbox"] {
        margin-top: 2px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .consent-label span {
        font-size: 13px;
        color: #333;
        line-height: 1.7;
    }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-vote-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00ae41, #008c34);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-vote-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 60px rgb(0 40 174 / 15%);
    }

    .btn-vote-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .btn-vote-submit svg {
        fill: currentColor;
    }

/* Work Info Section */
.work-info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgb(0 40 174 / 15%);
    height: fit-content;
}

.work-header h1 {
    color: #2d3091;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
}

.work-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .detail-item strong {
        color: #0b5f35;
        font-size: 14px;
        font-weight: 600;
    }

    .detail-item span,
    .detail-item p {
        color: #333;
        font-size: 16px;
        line-height: 1.6;
    }

    .detail-item.full-width {
        grid-column: 1 / -1;
    }

/* Responsive */
@media (max-width: 1024px) {
    .work-detail-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .voting-hero h1 {
        font-size: 28px;
    }

    .voting-hero p {
        font-size: 16px;
    }

    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .video-section,
    .work-info-section {
        padding: 20px;
    }

    .voting-form-container {
        padding: 20px;
    }
}

/* Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.custom-modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d3091;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #FFFFFF;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 50%;
}

    .modal-close:hover {
        background: #ebebeb;
        color: #333;
    }

.modal-body {
    padding: 30px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

    .modal-body p {
        margin-bottom: 16px;
    }

        .modal-body p:last-child {
            margin-bottom: 0;
        }

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.modal-close-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

@media (max-width: 480px) {
    .works-grid {
        grid-template-columns: 1fr;
    }

    .voting-hero {
        padding: 10px 20px;
    }

        .voting-hero h1 {
            font-size: 24px;
        }

    .custom-modal-content {
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }
}
