* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.register-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    margin-top: 40px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

header h1 {
    font-size: 42px;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
}

.dramas-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 50px;
}

.dramas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.drama-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

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

.drama-cover {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: white;
    overflow: hidden;
    position: relative;
}

.drama-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drama-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.drama-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.drama-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.drama-episodes {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
}

.drama-episodes i {
    color: #667eea;
}

.drama-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 15px;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.price-period {
    font-size: 14px;
    color: #999;
}

.drama-select-btn {
    width: 100%;
    padding: 12px;
    background-color: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.drama-select-btn:hover {
    background-color: #e8e8ff;
    border-color: #667eea;
}

.drama-select-btn.selected {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.drama-select-btn.selected i::before {
    content: '\f00c';
}

.subscription-summary {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.summary-header h3 {
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.selected-dramas {
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
}

.selected-dramas p {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

.selected-drama-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.selected-drama-item:last-child {
    border-bottom: none;
}

.drama-item-price {
    color: #667eea;
    font-weight: 600;
}

.summary-total {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-row span:last-child {
    font-weight: 600;
    color: #333;
}

#totalPrice {
    font-size: 24px;
    color: #667eea;
    font-weight: 700;
}

.subscribe-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.subscribe-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.faq-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.faq-question {
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    color: #667eea;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: #666;
    line-height: 1.6;
}

.faq-answer.show {
    max-height: 200px;
    padding-bottom: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.processing-modal {
    text-align: center;
}

.processing-spinner {
    margin-bottom: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-spinner p {
    color: #333;
    font-weight: 600;
    margin: 10px 0;
}

.processing-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.processing-status.success {
    background-color: #d4edda;
    color: #155724;
}

.processing-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-icon {
    font-size: 20px;
}

/* Payment Methods Modal */
.payment-methods-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.payment-methods-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-methods-modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.payment-methods-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.payment-methods-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.payment-methods-close:hover {
    color: #333;
}

.payment-methods-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
}

.payment-methods-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.payment-methods-btn.cancel {
    background-color: #f0f0f0;
    color: #666;
}

.payment-methods-btn.cancel:hover {
    background-color: #e0e0e0;
}

.payment-methods-btn.confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.payment-methods-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal .modal-content {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Payment Methods Section */
.form-section {
    margin: 20px 0;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
}

.payment-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
}

.payment-option label {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option input[type="radio"]:checked + label {
    border-color: #667eea;
    background-color: #f9f9ff;
}

.payment-icon {
    font-size: 24px;
    margin-right: 12px;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.payment-desc {
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dramas-container {
        grid-template-columns: 1fr;
    }

    .subscription-summary {
        position: static;
    }

    .dramas-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    header h1 {
        font-size: 28px;
    }

    .register-button {
        position: static;
        margin-top: 20px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dramas-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }

    .faq-section {
        padding: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .drama-cover {
        height: 120px;
        font-size: 60px;
    }
}
