/**
 * ======================================================================
 * APP REPOSITORY - MAIN STYLESHEET
 * ======================================================================
 * 
 * Purpose: Styling for the Official Android App Repository
 * Author: Result Hosting™ Enterprise System
 * Version: 1.0
 * 
 * STRUCTURE:
 * 1. CSS Variables & Root Styling
 * 2. Global Elements & Typography
 * 3. Navigation & Header
 * 4. Hero Section & Canvas
 * 5. App Cards & Tabs
 * 6. Modal Styling
 * 7. Footer
 * 8. Utility Classes
 * 9. Responsive Design
 * ======================================================================
 */

/* ======================================================================
   1. CSS VARIABLES & ROOT STYLING
   ====================================================================== */

:root {
    /* Color Palette */
    --android-green: #3ddc84;
    --android-green-dark: #1abc9c;
    --faculty-orange: #eb5d1e;
    --faculty-orange-dark: #ff7043;
    --driver-blue: #1e90ff;
    --driver-blue-dark: #00bcd4;
    --text-dark: #202124;
    --text-secondary: #5f6368;
    --text-muted: #6c757d;
    --border-light: #e8eaed;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-xxl: 24px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}


/* ======================================================================
   2. GLOBAL ELEMENTS & TYPOGRAPHY
   ====================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--text-dark);
}

p {
    margin: 0;
    color: var(--text-secondary);
}

/* ======================================================================
   3. NAVIGATION & HEADER
   ====================================================================== */

/* Security Banner */
.security-banner {
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e9 100%);
    color: #155724;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--android-green);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8fbff 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid var(--android-green);
    padding: 10px 0 !important;
    position: relative;
    z-index: 100;
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--text-dark) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap;
}

.brand-highlight {
    color: var(--android-green);
    font-weight: 900;
}

.nav-link {
    font-weight: 600;
    color: var(--text-secondary) !important;
    transition: all var(--transition-normal);
    padding: 8px 16px !important;
    border-radius: var(--radius-md);
    margin: 0 4px;
}

.nav-link:hover {
    color: var(--android-green) !important;
    background: rgba(61, 220, 132, 0.1);
}

/* ======================================================================
   4. HERO SECTION & CANVAS
   ====================================================================== */

#particleCanvas {
    display: block;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.hero-header {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    padding: 60px 20px;
}

.hero-header canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title strong {
    color: var(--android-green);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.lead {
    font-size: 1.1rem !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================================
   5. APP CARDS & TABS
   ====================================================================== */

/* Tab Navigation */
.nav-pills {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: var(--radius-lg);
}

.nav-pills .nav-link {
    background: var(--bg-white);
    color: var(--text-secondary) !important;
    border: 2px solid var(--border-light);
    padding: 10px 24px !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.nav-pills .nav-link:hover {
    border-color: var(--android-green);
    color: var(--android-green) !important;
    background: rgba(61, 220, 132, 0.05);
}

.nav-pills .nav-link.active {
    background: var(--android-green);
    color: white !important;
    border-color: var(--android-green);
    box-shadow: var(--shadow-lg);
}

/* App Card Container */
.app-card {
    transition: all var(--transition-normal);
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
}

.app-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.card-header-custom {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.app-icon.student-icon {
    width: 60px;
    height: 60px;
    background: var(--android-green);
}

.app-icon.staff-icon {
    width: 60px;
    height: 60px;
    background: var(--faculty-orange);
}

.app-icon.driver-icon {
    width: 60px;
    height: 60px;
    background: var(--driver-blue);
}

.app-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.developer-name {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
}

/* Meta Tags */
.meta-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-tags span {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Card Body */
.card-body {
    padding: 20px;
}

.card-body p {
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.card-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card-body li {
    margin-bottom: 6px;
}

.card-body li:last-child {
    margin-bottom: 0;
}

/* Accordion */
.accordion {
    margin-bottom: 15px;
}

.accordion-button {
    padding: 10px 15px !important;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-white) !important;
    border: none !important;
    transition: all var(--transition-normal);
}

.accordion-button:not(.collapsed) {
    background: rgba(61, 220, 132, 0.08) !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: var(--border-light) !important;
}

.accordion-body {
    padding: 12px 15px;
    font-size: 0.85rem;
    background: var(--bg-light);
}

.accordion-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.accordion-body li {
    padding: 6px 0;
}

/* Download Button */
.btn-install {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-install:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn-install:active {
    transform: scale(0.98);
}

/* ======================================================================
   6. MODAL STYLING
   ====================================================================== */

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--android-green) 0%, var(--android-green-dark) 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .btn-close {
    background-color: white;
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.modal-body {
    padding: 30px;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-control:focus {
    border-color: var(--android-green);
    box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.1);
}

.form-select {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.form-select:focus {
    border-color: var(--android-green);
    box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.1);
}

.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-weight: 500;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #c3e6cb;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid var(--border-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--android-green) 0%, var(--android-green-dark) 100%);
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    color: var(--text-dark);
    padding: 12px 32px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: white;
}

/* ======================================================================
   7. FOOTER
   ====================================================================== */

footer {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 60px 20px 30px;
    margin-top: 80px;
    border-top: 2px solid var(--border-light);
}

.footer-heading {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

footer p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
    font-weight: 500;
}

footer a:hover {
    color: var(--android-green);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(61, 220, 132, 0.1);
    color: var(--android-green);
    border-radius: 50%;
    margin-right: 12px;
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background: var(--android-green);
    color: white;
    transform: translateY(-4px);
}

.footer-divider {
    height: 1px;
    background: var(--border-light);
    margin: 40px 0;
}

.powered-by-container {
    text-align: center;
    padding: 40px 20px;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.powered-by-text {
    color: var(--text-secondary);
}

/* ======================================================================
   8. UTILITY CLASSES
   ======================================================================  */

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.gap-2 {
    gap: 8px !important;
}

.gap-3 {
    gap: 12px !important;
}

.gap-4 {
    gap: 16px !important;
}

.me-2 {
    margin-right: 8px !important;
}

.ms-2 {
    margin-left: 8px !important;
}

.mb-3 {
    margin-bottom: 12px !important;
}

.mb-4 {
    margin-bottom: 16px !important;
}

.mt-4 {
    margin-top: 16px !important;
}

.mt-3 {
    margin-top: 12px !important;
}

.py-5 {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
}

.px-3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.border {
    border: 1px solid var(--border-light) !important;
}

/* ======================================================================
   9. BACK TO TOP BUTTON
   ====================================================================== */

#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--android-green) 0%, var(--android-green-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

#backToTopBtn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(61, 220, 132, 0.3);
}

#backToTopBtn:active {
    transform: translateY(0);
}

/* ======================================================================
   10. RESPONSIVE DESIGN
   ====================================================================== */

/* Tablets */
@media (max-width: 768px) {
    .hero-header {
        min-height: 500px;
        padding: 40px 16px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .nav-pills {
        gap: 8px;
    }
    
    .nav-pills .nav-link {
        padding: 8px 16px !important;
        font-size: 0.9rem;
    }
    
    .app-card {
        margin-bottom: 20px;
    }
    
    footer {
        padding: 40px 16px 16px;
    }
    
    #backToTopBtn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .security-banner {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-header {
        min-height: 400px;
        padding: 30px 12px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .nav-pills {
        padding: 12px;
        gap: 6px;
    }
    
    .nav-pills .nav-link {
        padding: 6px 12px !important;
        font-size: 0.8rem;
    }
    
    .card-header-custom {
        gap: 12px;
    }
    
    .app-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px;
    }
    
    .app-name {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .meta-tags {
        gap: 6px;
    }
    
    .meta-tags span {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    .accordion-button {
        padding: 8px 12px !important;
        font-size: 0.85rem;
    }
    
    .accordion-body {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .btn-install {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    footer {
        padding: 30px 12px 12px;
    }
    
    .footer-heading {
        font-size: 1rem;
    }
    
    .powered-by {
        font-size: 0.9rem;
    }
    
    #backToTopBtn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 16px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* ======================================================================
   11. PRINT STYLES
   ====================================================================== */

@media print {
    .security-banner,
    .navbar,
    #backToTopBtn,
    footer {
        display: none;
    }
    
    .hero-header {
        padding: 0;
    }
}
