/* Fresh Poll Manager - Clean CSS */

.fresh-poll-create-form,
.fresh-poll-display,
.fresh-poll-edit-auth,
.fresh-poll-edit-form,
.fresh-poll-register,
.fresh-poll-login,
.fresh-poll-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.poll-form-container,
.poll-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.poll-form-title,
.poll-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.section-title {
    color: #555;
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.form-section {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}

.radio-label:hover,
.checkbox-label:hover {
    background: #f5f5f5;
}

.radio-label input,
.checkbox-label input {
    margin-right: 8px;
}

.poll-options {
    margin-bottom: 20px;
}

.poll-option {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.poll-option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.poll-option input[type="radio"] {
    margin-right: 10px;
}

.option-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.option-input {
    flex: 1;
}

.remove-option-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-option-btn:hover {
    background: #c82333;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.poll-results-container {
    margin-top: 20px;
}

.poll-result-item {
    margin-bottom: 15px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.result-text {
    font-weight: 500;
}

.result-count {
    font-size: 14px;
    color: #666;
}

.result-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.result-fill {
    height: 100%;
    background: #007cba;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.poll-voted-message {
    display: flex;
    align-items: center;
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
}

.voted-icon {
    margin-right: 8px;
    font-weight: bold;
}

.poll-no-votes {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.form-messages {
    margin-top: 15px;
}

.message {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-icon {
    margin-right: 8px;
    font-weight: bold;
}

.poll-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

.poll-actions {
    text-align: center;
    margin-top: 20px;
}

.poll-description {
    color: #666;
    margin-bottom: 15px;
}

/* Edit form specific styles */
.edit-description {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

#edit-poll-options-container .option-group {
    margin-bottom: 10px;
}

#add-edit-option-btn {
    margin-top: 10px;
}

/* Ultra Modern Compact Dashboard */
.dashboard-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin: 0;
}

.dashboard-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.dashboard-user-info {
    margin: 4px 0 0 0;
}

.dashboard-user-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dashboard-content {
    padding: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: #ffffff;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.stat-box:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-box h3 {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.stat-box p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.polls-list h3 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.polls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.poll-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.poll-card-image {
    margin: -16px -16px 12px -16px;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    height: 120px;
}

.poll-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.poll-image {
    margin: -20px -20px 16px -20px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    height: 200px;
}

.poll-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.poll-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

.poll-card-header {
    margin-bottom: 12px;
}

.poll-card-title {
    margin: 0 0 8px 0;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poll-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.poll-status,
.poll-visibility {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fef2f2;
    color: #991b1b;
}

.visibility-public {
    background: #dbeafe;
    color: #1e40af;
}

.visibility-private {
    background: #fef3c7;
    color: #92400e;
}

.poll-card-content {
    margin-bottom: 12px;
}

.poll-card-description {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poll-card-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
}

.poll-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btn-small.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-small.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-small.btn-primary {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

.btn-small.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-small.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-small.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.no-polls {
    text-align: center;
    padding: 48px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.no-polls p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

.no-polls .btn {
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #3b82f6;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.no-polls .btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Modern Button Styles */
.btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-link a,
.register-link a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .fresh-poll-create-form,
    .fresh-poll-display,
    .fresh-poll-edit-auth,
    .fresh-poll-edit-form,
    .fresh-poll-register,
    .fresh-poll-login,
    .fresh-poll-dashboard {
        padding: 15px;
    }
    
    .poll-form-container,
    .poll-container,
    .dashboard-container {
        padding: 20px;
    }
    
    .option-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .remove-option-btn {
        align-self: flex-end;
        margin-top: 5px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
        padding: 12px 16px;
    }
    
    .dashboard-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .polls-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .poll-card-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .stat-box {
        padding: 12px;
    }
    
    .stat-box h3 {
        font-size: 20px;
    }
    
    .dashboard-title {
        font-size: 18px;
    }
    
    .poll-card {
        padding: 12px;
    }
    
    .poll-card-image {
        margin: -12px -12px 8px -12px;
        height: 100px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn-small {
        padding: 3px 6px;
        font-size: 9px;
    }
}

/* Modern Thumbnail Card Poll List */
.fresh-poll-list {
    margin: 20px 0;
}

.polls-list-header {
    text-align: center;
    margin-bottom: 32px;
}

.polls-list-title {
    margin: 0 0 8px 0;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.polls-list-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
}

.polls-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
}

.poll-list-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.2);
}

.poll-list-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.poll-list-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.poll-list-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.poll-list-card:hover .poll-list-img {
    transform: scale(1.05);
}

.poll-list-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.placeholder-icon {
    font-size: 48px;
    opacity: 0.8;
}

.poll-list-content {
    padding: 20px;
    position: relative;
}

.poll-list-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.poll-list-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poll-list-title a:hover {
    color: #3b82f6;
}

.poll-list-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poll-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.poll-list-stats {
    display: flex;
    gap: 16px;
}

.poll-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.stat-icon {
    font-size: 16px;
}

.poll-list-actions {
    display: flex;
    gap: 8px;
}

.poll-list-card .btn-small {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.poll-list-card .btn-small:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.no-polls-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 18px;
    font-weight: 500;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
    margin: 0;
}

.poll-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    font-size: 16px;
    font-weight: 500;
    background: #fef2f2;
    border-radius: 12px;
    border: 1px solid #fecaca;
    margin: 20px 0;
}

/* Card overlay effect */
.poll-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.poll-list-card:hover::before {
    opacity: 1;
}

/* Responsive Poll List */
@media (max-width: 768px) {
    .polls-list-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .poll-list-card {
        margin-bottom: 0;
    }
    
    .poll-list-image {
        height: 180px;
    }
    
    .poll-list-content {
        padding: 16px;
    }
    
    .poll-list-title {
        font-size: 16px;
    }
    
    .poll-list-description {
        font-size: 13px;
    }
    
    .poll-list-meta {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .poll-list-stats {
        justify-content: center;
        gap: 12px;
    }
    
    .poll-list-actions {
        justify-content: center;
    }
    
    .poll-stat {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .polls-list-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .polls-list-grid {
        gap: 12px;
    }
    
    .poll-list-image {
        height: 160px;
    }
    
    .poll-list-content {
        padding: 12px;
    }
    
    .poll-list-title {
        font-size: 15px;
    }
    
    .poll-list-description {
        font-size: 12px;
    }
    
    .poll-stat {
        font-size: 11px;
        padding: 3px 6px;
    }
}