/* Terms Modal Styles - Matching Login Card Aesthetic */
.terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.terms-modal {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border-radius: 32px;
    padding: 0; /* Content handles padding */
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(168, 107, 62, 0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.terms-modal-overlay.active .terms-modal {
    transform: scale(1) translateY(0);
}

/* Gradient Border Effect */
.terms-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(125, 63, 38, 0.6) 0%, 
        rgba(212, 165, 116, 0.8) 30%,
        rgba(242, 207, 123, 0.9) 50%,
        rgba(212, 165, 116, 0.8) 70%,
        rgba(125, 63, 38, 0.6) 100%);
    border-radius: 32px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

/* Header */
.terms-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid rgba(168, 107, 62, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

.terms-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.terms-icon {
    color: #d4a574;
    filter: drop-shadow(0 0 12px rgba(212, 165, 116, 0.4));
}

.terms-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #E8DCC4;
    margin: 0;
    letter-spacing: -0.5px;
}

.terms-subtitle {
    color: rgba(196, 181, 160, 0.7);
    font-size: 0.95rem;
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    font-weight: 500;
}

/* Highlights Section */
.terms-highlights {
    padding: 24px 32px;
    background: rgba(168, 107, 62, 0.08);
    border-bottom: 1px solid rgba(168, 107, 62, 0.15);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.terms-highlight-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.terms-highlight-icon {
    color: #f2cf7b;
    flex-shrink: 0;
    margin-top: 2px;
    filter: drop-shadow(0 0 8px rgba(242, 207, 123, 0.3));
}

.terms-highlight-text h4 {
    color: #f4f1ea;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    font-family: 'Quicksand', sans-serif;
}

.terms-highlight-text p {
    color: rgba(196, 181, 160, 0.7);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    font-family: 'Quicksand', sans-serif;
}

/* Scrollable Content */
.terms-content {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    color: rgba(196, 181, 160, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Quicksand', sans-serif;
}

.terms-section {
    margin-bottom: 28px;
}

.terms-section:last-child {
    margin-bottom: 0;
}

.terms-section h3 {
    color: #E8DCC4;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    font-family: 'Comfortaa', sans-serif;
}

.terms-section p {
    margin: 0 0 12px 0;
}

.terms-section ul {
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.terms-section li {
    margin-bottom: 6px;
}

/* Scrollbar */
.terms-content::-webkit-scrollbar {
    width: 6px;
}

.terms-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.terms-content::-webkit-scrollbar-thumb {
    background: rgba(168, 107, 62, 0.3);
    border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 107, 62, 0.5);
}

/* Footer */
.terms-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(168, 107, 62, 0.15);
    background: rgba(10, 9, 8, 0.4);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.terms-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Quicksand', sans-serif;
}

.terms-btn-secondary {
    background: transparent;
    color: rgba(196, 181, 160, 0.7);
    border: 1px solid transparent;
}

.terms-btn-secondary:hover {
    color: #f4f1ea;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 107, 62, 0.2);
}

.terms-btn-primary {
    background: linear-gradient(135deg, #f2cf7b 0%, #d29658 70%, #7d3f26 100%);
    color: #0a0a0a;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

.terms-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.3);
}

.terms-btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .terms-highlights {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .terms-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 24px;
    }
    
    .terms-modal::before {
        border-radius: 24px;
    }
    
    .terms-header,
    .terms-highlights,
    .terms-content,
    .terms-footer {
        padding: 20px 24px;
    }
    
    .terms-title {
        font-size: 1.2rem;
    }
    
    .terms-footer {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .terms-btn {
        width: 100%;
        justify-content: center;
    }
}
