/* Poll Creation Modal Styles */
.poll-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.poll-modal-overlay.active {
    display: flex;
}

.poll-modal-container {
    background: #181a1c;
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(76, 175, 80, 0.1) inset;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poll-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem 1.75rem 2.5rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.15);
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.08) 0%, transparent 100%);
}

.poll-modal-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.poll-modal-header h3::before {
    content: '\f080';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poll-modal-close {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-modal-close:hover {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.3);
    color: #ff4757;
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.poll-modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

.poll-modal-content {
    padding: 2rem 2.5rem;
    max-height: 60vh;
    overflow-y: auto;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.poll-modal-content::-webkit-scrollbar {
    width: 10px;
}

.poll-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 8px 0;
}

.poll-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.25));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.poll-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.6), rgba(76, 175, 80, 0.4));
    background-clip: padding-box;
}

.poll-question-section,
.poll-options-section,
.poll-settings-section,
.poll-duration-section {
    margin-bottom: 2rem;
}

.poll-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}

.poll-label::before {
    content: '';
    width: 4px;
    height: 1rem;
    background: linear-gradient(180deg, #4CAF50, #45a049);
    border-radius: 2px;
}

.poll-question-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: inherit;
    resize: none;
    min-height: 80px;
    max-height: 150px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.poll-question-input:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.poll-question-input:focus {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15), 0 8px 24px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.poll-char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.poll-options-container {
    margin-bottom: 1rem;
}

.poll-option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.poll-option-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.poll-option-input:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.poll-option-input:focus {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15), 0 4px 16px rgba(76, 175, 80, 0.2);
    transform: translateX(5px);
}

.poll-option-remove {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1.5px solid rgba(255, 71, 87, 0.3);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.poll-option-remove:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.poll-option-remove:active {
    transform: scale(0.95) rotate(90deg);
}

.poll-add-option-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    color: #4CAF50;
    border: 2px dashed rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    justify-content: center;
}

.poll-add-option-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
    border-color: rgba(76, 175, 80, 0.5);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
}

.poll-add-option-btn:active {
    transform: translateY(0);
}

.poll-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.poll-setting-item {
    display: flex;
    align-items: center;
}

.poll-setting-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.poll-checkbox {
    display: none;
}

.poll-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-checkbox:checked + .poll-checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
}

.poll-checkbox:checked + .poll-checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 0.8rem;
}

.poll-duration-select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.poll-duration-select option {
    background: #1e2022;
    color: #ffffff;
    padding: 0.75rem;
    font-weight: 500;
}

.poll-duration-select:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

.poll-duration-select:focus {
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15), 0 4px 16px rgba(76, 175, 80, 0.2);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
}

.poll-duration-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.poll-duration-info i {
    color: #4CAF50;
    font-size: 0.9rem;
}

.poll-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
}

.poll-cancel-btn {
    padding: 0.85rem 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.poll-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.poll-cancel-btn:active {
    transform: translateY(0);
}

.poll-create-btn {
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3), 0 0 0 1px rgba(76, 175, 80, 0.2) inset;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.poll-create-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.poll-create-btn:hover:not(:disabled)::before {
    left: 100%;
}

.poll-create-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(76, 175, 80, 0.4), 0 0 0 1px rgba(76, 175, 80, 0.3) inset;
}

.poll-create-btn:active:not(:disabled) {
    transform: translateY(0);
}

.poll-create-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Poll Preview in Post Input */
.poll-preview {
    margin: 1.5rem 0;
    padding: 1.75rem;
    background: linear-gradient(145deg, rgba(30, 32, 34, 0.95), rgba(24, 26, 28, 0.98));
    border: 1px solid rgba(76, 175, 80, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(76, 175, 80, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.poll-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
}

.poll-preview::after {
    content: '\f080';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    opacity: 0.06;
    pointer-events: none;
    color: #4CAF50;
}

.poll-preview-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.poll-preview-remove {
    background: rgba(30, 32, 34, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    margin-left: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    position: relative;
    z-index: 10;
}

.poll-preview-remove:hover {
    background: rgba(239, 83, 80, 0.2);
    border-color: rgba(239, 83, 80, 0.4);
    color: #EF5350;
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.3);
}

.poll-preview-remove:active {
    transform: scale(0.95) rotate(90deg);
}

.poll-preview-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.poll-preview-option {
    padding: 0.85rem 1.15rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    font-size: 0.92rem;
    color: #e2e8f0;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.poll-preview-option:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 768px) {
    .poll-modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .poll-modal-header,
    .poll-modal-content,
    .poll-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .poll-modal-footer {
        flex-direction: column;
    }
    
    .poll-cancel-btn,
    .poll-create-btn {
        width: 100%;
        justify-content: center;
    }
}
