/* ============================================
   MZIMBA SOUTH EDUDATA HUB - Premium CSS
   Modern Glassmorphism Design
   ============================================ */

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #667eea;
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ============================================
   SPLASH SCREEN
   ============================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: splashFadeOut 0.5s ease-out 5s forwards;
}

.splash-content {
    text-align: center;
    position: relative;
}

.splash-icon {
    margin-bottom: 30px;
    position: relative;
}

.splash-logo {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    animation: logoPulse 2s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(102, 126, 234, 0.6);
}

.loading-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

.splash-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 2s ease-in-out infinite;
    z-index: -1;
}

/* ============================================
   MAIN APPLICATION
   ============================================ */

.main-app {
    min-height: 100vh;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

/* ============================================
   GLASS CARD COMPONENT
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* ============================================
   SEARCH PORTAL
   ============================================ */

.search-portal {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.portal-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.portal-header {
    margin-bottom: 40px;
}

.portal-logo {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

.portal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portal-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Search Box */
.search-container {
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    padding: 18px 20px;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-radius: 15px 0 0 15px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
}

.search-btn {
    background: var(--primary-gradient);
    border: none;
    padding: 18px 25px;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* Search Results */
.search-results {
    margin-top: 20px;
    text-align: left;
}

.results-section {
    margin-bottom: 20px;
}

.results-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: var(--accent-color);
}

.result-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.result-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--error-color);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ============================================
   SCHOOL PASSWORD PAGE
   ============================================ */

.school-password {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.password-container {
    max-width: 500px;
    width: 100%;
    padding: 40px;
    text-align: center;
}

.password-header {
    margin-bottom: 30px;
}

.password-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.password-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.selected-school {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input,
.admin-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.password-input:focus,
.admin-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.submit-btn,
.admin-submit-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover,
.admin-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.password-error {
    color: var(--error-color);
    margin-top: 15px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.password-success {
    color: var(--success-color);
    margin-top: 15px;
    padding: 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ============================================
   DATA CATEGORY PAGE
   ============================================ */

.data-category {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.category-container {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.category-header {
    margin-bottom: 40px;
}

.category-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.category-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.category-school {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.category-card {
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ============================================
   DATA PAGES
   ============================================ */

.data-page {
    min-height: 100vh;
    padding: 40px 20px;
}

.data-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.data-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.data-page-title {
    font-size: 2rem;
    font-weight: 700;
}

/* Particulars Content */
.particulars-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.particular-card {
    padding: 25px;
}

.particular-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.particular-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Enrollment Content */
.enrollment-content,
.pslce-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-record {
    padding: 30px;
    margin-bottom: 20px;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.record-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.record-period {
    font-size: 1.1rem;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.total-row {
    background: rgba(102, 126, 234, 0.1) !important;
    font-weight: 700;
}

/* ============================================
   ADMIN MODAL
   ============================================ */

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.admin-modal-content {
    max-width: 450px;
    width: 90%;
    padding: 40px;
    position: relative;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-login-error {
    color: var(--error-color);
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-align: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes titleGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(50px, -50px); }
    50% { transform: translate(0, -100px); }
    75% { transform: translate(-50px, -50px); }
}

@keyframes splashFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .portal-title,
    .category-title,
    .data-page-title {
        font-size: 1.8rem;
    }
    
    .splash-title {
        font-size: 1.8rem;
    }
    
    .splash-logo {
        width: 100px;
        height: 100px;
    }
    
    .category-cards {
        grid-template-columns: 1fr;
    }
    
    .data-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .particulars-content {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 15px;
        margin-bottom: 10px;
    }
    
    .search-btn {
        border-radius: 15px;
        width: 100%;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .portal-title,
    .category-title,
    .data-page-title {
        font-size: 1.5rem;
    }
    
    .splash-title {
        font-size: 1.5rem;
    }
    
    .password-container,
    .admin-modal-content {
        padding: 25px;
    }
    
    .category-card {
        padding: 20px;
    }
}
