/**
 * NDEXT Voting - Frontend Styles
 */

.ndext-voting-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ndext-heading {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e91e63;
}

.ndext-closed-banner {
    background: #f8d7da;
    color: #721c24;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
}

.ndext-peek-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
}

.ndext-mode-notice {
    background: #e3f2fd;
    color: #1565c0;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
}

.ndext-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .ndext-options-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .ndext-options-grid { grid-template-columns: repeat(3, 1fr); }
}

.ndext-option {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ndext-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ndext-option.ndext-voted {
    border: 3px solid #4caf50;
}

.ndext-option-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: #f5f5f5;
}

.ndext-option-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ndext-option:hover .ndext-option-image img {
    transform: scale(1.05);
}

.ndext-option-content {
    padding: 20px;
}

.ndext-option-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.ndext-option-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
    line-height: 1.5;
}

.ndext-result-bar {
    position: relative;
    background: #eee;
    height: 30px;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
}

.ndext-result-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    border-radius: 15px;
    transition: width 0.5s ease;
}

.ndext-result-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 0 3px #fff;
    white-space: nowrap;
}

.ndext-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(233,30,99,0.3);
    min-height: 50px;
}

.ndext-vote-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,30,99,0.4);
}

.ndext-vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.ndext-vote-btn.ndext-btn-voted {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.ndext-vote-btn.ndext-btn-disabled {
    background: #9e9e9e;
    box-shadow: none;
}

.ndext-vote-btn.ndext-btn-voting {
    background: #999;
    pointer-events: none;
}

.ndext-spinner { width: 20px; height: 20px; }

@keyframes ndext-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ndext-option.ndext-just-voted {
    animation: ndext-pulse 0.5s ease;
}

.ndext-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.ndext-secret-trigger {
    display: inline-block;
    width: 50px;
    height: 50px;
}

.ndext-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
}

.ndext-toast.ndext-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ndext-toast.ndext-toast-success {
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

.ndext-toast.ndext-toast-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.ndext-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 9998;
}

@media (prefers-color-scheme: dark) {
    .ndext-voting-container { color: #fff; }
    .ndext-heading { color: #fff; }
    .ndext-option { background: #1e1e1e; }
    .ndext-option-title { color: #fff; }
    .ndext-option-desc { color: #aaa; }
}

.ndext-vote-btn:focus {
    outline: 3px solid #2196f3;
    outline-offset: 2px;
}

@media print {
    .ndext-vote-btn, .ndext-footer { display: none; }
}
