
/* Ultra Vibrant Colorful Theme */
:root {
    /* Cool Modern Color Palette */
    --primary-start: #667eea;
    --primary-end: #f8fafc;
    
    /* Cool semantic colors */
    --primary-color: #667eea;
    --secondary-color: #6c757d;
    --success-color: #10d88c;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #ffffff;
    --dark-color: #2c3e50;
    
    /* Text colors */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-white: #ffffff;
    
    /* Background colors - Cool and modern */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-light: #edf2f7;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #f8fafc 100%);
    --bg-card: #ffffff;
    --bg-white: #ffffff;
    
    /* Colorful accent icons */
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    /* Border and shadow colors - Cool modern */
    --border-color: #e2e8f0;
    --shadow-color: rgba(102, 126, 234, 0.1);
    --shadow-hover: rgba(102, 126, 234, 0.2);
    --shadow-colorful: 0 4px 15px rgba(102, 126, 234, 0.1);
    
    /* Interactive colors */
    --hover-overlay: rgba(255, 255, 255, 0.2);
    --active-overlay: rgba(255, 255, 255, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-duration: 0.3s; /* Add missing variable */
    
    /* Missing border radius variable */
    --border-radius: 1rem;
}

/* Enhanced Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: transform var(--transition-fast);
}

.nav-link {
    font-weight: 500;
    position: relative;
    color: var(--text-primary) !important;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Enhanced Hero Section */
#hero {
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero img {
    transition: transform var(--transition-normal);
}

#hero img:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Enhanced Section Titles */
.text-gradient {
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    display: inline-block;
}

/* Enhanced Status Indicators */
.status-indicator {
    background: rgba(248, 249, 250, 0.9);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid rgba(108, 117, 125, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.status-indicator:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: rgba(108, 117, 125, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.status-indicator:hover::before {
    left: 100%;
}

.status-indicator i {
    display: block;
    margin-bottom: 0.5rem;
    transition: transform var(--transition-fast);
}

.status-indicator:hover i {
    transform: scale(1.2);
}

.status-indicator strong {
    display: block;
    font-weight: 600;
    color: #343a40 !important;
    margin-bottom: 0.25rem;
}

.status-indicator small {
    color: #6c757d !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced App Cards */
.app-card-featured {
    background: rgba(248, 249, 250, 0.9);
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(108, 117, 125, 0.2);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2c3e50;
    opacity: 0;
    transition: opacity var(--transition-duration) ease;
}

.app-card-featured:hover::before {
    opacity: 1;
}

.app-card-featured:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(108, 117, 125, 0.3);
}

.app-card-featured .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    border-radius: 2rem;
    padding: 0.4rem 0.8rem;
}

/* Regular App Cards for Grid */
.app-card {
    background: rgba(248, 249, 250, 0.9);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 1rem;
    border: 2px solid rgba(108, 117, 125, 0.2);
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2c3e50;
    opacity: 0;
    transition: opacity var(--transition-duration) ease;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(108, 117, 125, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.app-card i {
    transition: all var(--transition-normal);
    margin-bottom: 1rem;
}

.app-card:hover i {
    transform: scale(1.2);
}

.app-card h6 {
    color: #343a40 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.app-card small {
    color: #6c757d !important;
    position: relative;
    z-index: 1;
}

.app-card-featured h5 {
    color: #343a40 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.app-card-featured p {
    color: #6c757d !important;
}

/* List View Styles */
.app-list-item {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.app-list-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(102, 126, 234, 0.05) 100%);
    color: inherit;
    text-decoration: none;
}

.app-list-item .app-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: var(--bg-light);
    transition: all var(--transition-fast);
}

.app-list-item:hover .app-icon {
    transform: scale(1.1);
    background: rgba(102, 126, 234, 0.1);
}

.app-list-item .app-details h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.app-list-item .app-details small {
    color: var(--text-muted);
}

.app-list-item .app-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

/* Filter Buttons */
.btn-group .btn {
    border-radius: 0;
    position: relative;
    z-index: 1;
    transition: all var(--transition-fast);
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

.btn-group .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    z-index: 2;
}

/* View Toggle Controls */
.position-fixed .btn-group .btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

.position-fixed .btn-group .btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.position-fixed .form-select {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Spacing */
section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Tools Count Animation */
#tools-count {
    font-weight: 600;
    color: var(--primary-color);
    transition: all var(--transition-fast);
}

/* Enhanced Footer */
footer {
    background: #ffffff !important;
    border-top: 1px solid rgba(108, 117, 125, 0.2);
}

.lang-active {
    background-color: var(--accent-green) !important;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-3 {
        font-size: 2.8rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    /* Navigation adjustments */
    .navbar-brand span {
        font-size: 1.1rem;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    #hero img {
        width: 100px;
        height: 100px;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    /* Status indicators - stack better */
    .status-indicator {
        padding: 1.25rem 1rem;
        margin-bottom: 1rem;
    }
    
    .status-indicator i {
        font-size: 1.8rem !important;
    }
    
    /* Tool cards adjustments */
    .app-card-featured {
        margin-bottom: 1.5rem;
    }
    
    .app-card-featured i {
        font-size: 3rem !important;
    }
    
    /* Filter buttons stack on mobile */
    .d-flex.justify-content-center.gap-3.mt-4.flex-wrap {
        flex-direction: column;
        align-items: center;
        gap: 1rem !important;
    }
    
    .btn-group {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
    
    .btn-group .btn {
        min-width: 70px;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    /* Fixed header controls */
    .position-fixed.top-0.end-0 {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1060 !important;
    }
    
    .position-fixed .form-select {
        min-width: 90px !important;
        font-size: 0.8rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand img {
        width: 28px;
        height: 28px;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
    
    /* Hero section */
    #hero {
        min-height: 50vh;
        padding: 1.5rem 0;
    }
    
    #hero img {
        width: 80px;
        height: 80px;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem !important;
    }
    
    /* Action buttons */
    .d-flex.gap-3.justify-content-center.flex-wrap {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 200px;
    }
    
    /* About section */
    .row.g-4.mt-4 .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    .fa-3x {
        font-size: 2.5rem !important;
    }
    
    /* Status indicators */
    .status-indicator {
        padding: 1rem 0.75rem;
    }
    
    .status-indicator i {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem;
    }
    
    .status-indicator strong {
        font-size: 0.9rem;
    }
    
    .status-indicator small {
        font-size: 0.7rem;
    }
    
    /* Tools section */
    .app-card {
        padding: 1rem 0.5rem;
        min-height: 120px;
    }
    
    .app-card i {
        font-size: 2rem !important;
        margin-bottom: 0.75rem;
    }
    
    .app-card h6 {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .app-card small {
        font-size: 0.7rem;
    }
    
    /* Featured tools */
    .app-card-featured {
        padding: 1.5rem 1rem !important;
    }
    
    .app-card-featured i {
        font-size: 2.5rem !important;
    }
    
    .app-card-featured h5 {
        font-size: 1rem;
    }
    
    .app-card-featured p {
        font-size: 0.8rem;
    }
    
    /* Section spacing */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 576px) {
    /* Ultra mobile optimizations */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Fixed controls */
    .position-fixed.top-0.end-0 {
        top: 5px !important;
        right: 5px !important;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    /* Hero */
    #hero {
        min-height: 45vh;
    }
    
    .display-3 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    /* Filter buttons */
    .btn-group {
        flex-direction: column;
        width: 100%;
        max-width: 250px;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius-sm) !important;
        margin-bottom: 0.25rem;
        width: 100%;
    }
    
    /* Status grid - 2 columns only */
    .row.g-3.g-md-4.justify-content-center .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .row.g-3.g-md-4.justify-content-center .col-sm-4,
    .row.g-3.g-md-4.justify-content-center .col-md-3,
    .row.g-3.g-md-4.justify-content-center .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Tools grid - single column for all tools on mobile */
    #all-tools-grid .col-6.col-sm-4.col-md-3.col-lg-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Featured tools - single column */
    .app-card-featured {
        margin-bottom: 1rem;
    }
    
    #featured-tools .col-12.col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Section titles */
    .display-6 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    /* Footer */
    footer .row {
        text-align: center;
    }
    
    footer .col-md-6 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 400px) {
    /* Extra small devices */
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .display-3 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .app-card {
        padding: 0.75rem 0.25rem;
        min-height: 100px;
    }
    
    .app-card i {
        font-size: 1.5rem !important;
    }
    
    .app-card h6 {
        font-size: 0.8rem;
    }
    
    .status-indicator {
        padding: 0.75rem 0.5rem;
    }
    
    .status-indicator i {
        font-size: 1.2rem !important;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-card: #252525;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #999999;
        --border-color: #404040;
    }
}

/* Pulse animation for network monitoring indicator */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
