:root {
    --macos-bg: #f5f5f7;
    --macos-card: #ffffff;
    --macos-border: #e0e0e0;
    --macos-text: #1d1d1f;
    --macos-text-secondary: #86868b;
    --macos-accent: #007aff;
    --macos-success: #30d158;
    --macos-danger: #ff453a;
    --macos-purple: #8e44ad;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: var(--macos-bg);
    color: var(--macos-text);
    line-height: 1.5;
}

/* Terms and Conditions Styles */
.terms-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}

.terms-overlay.active {
    display: flex;
}

.terms-modal {
    background: var(--macos-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--macos-border);
}

.terms-header {
    background: linear-gradient(135deg, var(--macos-purple), #6c3483);
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-logo {
    margin-bottom: 50px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.terms-title {
    flex: 1;
}

.terms-title h2 {
    font-size: 1.4rem;
    font-weight: 600;
    padding-bottom: 20px;
    margin: 10px;
}

.p-title {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #ffff;
    padding: 0;
    margin: 0;

}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.terms-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}

.terms-section {
    margin-bottom: 25px;
}

.terms-section h3 {
    color: var(--macos-purple);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: left;
    gap: 8px;
}

.terms-section h3 i {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 5px;
}

.terms-section p {
    margin-bottom: 10px;
    color: var(--macos-text);
    font-size: 0.9rem;
    text-align: left;
}

.terms-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.terms-section li {
    margin-bottom: 6px;
    color: var(--macos-text);
    font-size: 0.9rem;
}

.ph-compliance {
    background: linear-gradient(135deg, #ce1126, #0038a8);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 0.85rem;
    border-left: 4px solid #fcd116;
}

.ph-compliance strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.terms-footer {
    padding: 20px 30px;
    background: #f8f8f8;
    border-top: 1px solid var(--macos-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.terms-agreement {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--macos-purple);
    cursor: pointer;
    
}

.checkbox-wrapper label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--macos-text);
    cursor: pointer;
    margin-top: 10px;

}

.terms-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-outline {
    background: transparent;
    color: var(--macos-text);
    border: 1px solid var(--macos-border);
}

.btn-outline:hover {
    background: #f0f0f0;
    border-color: #c0c0c0;
}

.btn-primary {
    background: var(--macos-purple);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #7d3c98;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.btn-primary:disabled {
    background: var(--macos-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.last-updated {
    color: var(--macos-text-secondary);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--macos-border);
}

/* Scrollbar Styling */
.terms-content::-webkit-scrollbar {
    width: 6px;
}

.terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: var(--macos-text-secondary);
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: var(--macos-text);
}

/* 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);
    }
}

/* Form Styles */
small.error {
    color: red;
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
}

.teacher-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
}

.error-message {
    color: red;
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
}

.terms-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}

.terms-link:hover {
    color: #0056b3;
}

.terms-checkbox-error {
    color: red;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .terms-overlay {
        padding: 15px;
    }
    
    .terms-modal {
        max-height: 95vh;
    }
    
    .terms-header {
        padding: 20px;
    }
    
    .terms-content {
        padding: 20px;
        max-height: 40vh;
    }
    
    .terms-footer {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .terms-buttons {
        width: 100%;
    }
    
    .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .terms-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .terms-title h2 {
        font-size: 1.2rem;
    }
}