/* Modal 樣式 */

#modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: var(--color-white);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.modal-body {
    margin-bottom: 1.5rem;
    color: var(--color-black);
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 0.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
    color: var(--color-white);
}

.modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-btn-cancel {
    background: var(--color-white);
    color: var(--color-black);
    border: 2px solid var(--color-purple);
}

.modal-btn-cancel:hover {
    background: var(--color-purple);
    color: var(--color-white);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 2rem;
    color: var(--color-black);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.modal-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Modal 類型樣式 */
.modal-info .modal-title {
    color: var(--color-blue);
}

.modal-success .modal-title {
    color: #4CAF50;
}

.modal-error .modal-title {
    color: #ff6b6b;
}

.modal-warning .modal-title {
    color: var(--color-orange);
}

.modal-confirm .modal-title {
    color: var(--color-purple);
}

/* Modal 表單樣式 */
.publish-form-modal {
    text-align: left;
}

.publish-form-modal .form-group {
    margin-bottom: 1.5rem;
}

.publish-form-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-black);
    font-weight: 600;
}

.publish-form-modal .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-purple);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.publish-form-modal .form-group input:focus {
    outline: none;
    border-color: var(--color-blue);
}

.publish-form-modal .terms-checkbox {
    margin: 1.5rem 0;
}

.publish-form-modal .terms-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.publish-form-modal .terms-text {
    background: rgba(187, 145, 255, 0.1);
    border: 2px solid var(--color-purple);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 響應式 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

