:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --bg-card-hover: #303030;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-primary: #00d4ff;
    --accent-secondary: #00ff88;
    --border-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-primary: #0088cc;
    --accent-secondary: #00aa55;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: var(--transition);
}

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.dashboard-header {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 7.2rem;
    width: auto;
    filter: brightness(1.1);
    transition: var(--transition);
}

.header-logo:hover {
    filter: brightness(1.3);
    transform: scale(1.05);
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 500;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

#searchInput {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border-radius: 0.5rem;
    width: 300px;
    font-size: 0.875rem;
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.datetime {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--accent-secondary);
    font-weight: 500;
}

.theme-toggle {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.auth-button {
    background-color: var(--accent-primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.auth-button:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    font-weight: 500;
}

.user-info i {
    color: var(--accent-primary);
}

/* Main Dashboard Grid */
.dashboard-grid {
    flex: 1;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    align-content: start;
}

/* Section Styles */
.dashboard-section {
    background-color: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.dashboard-section:hover {
    box-shadow: var(--shadow-hover);
}

.section-header {
    background-color: var(--bg-card);
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.section-header:hover {
    background-color: var(--bg-card-hover);
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2 i {
    color: var(--accent-primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.section-collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-collapsed .section-content {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

/* Link Card Styles */
.link-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.link-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateX(3px);
    box-shadow: var(--shadow);
}

.link-card:hover::before {
    transform: scaleY(1);
}

.link-card i {
    font-size: 1.25rem;
    color: var(--accent-primary);
    width: 30px;
    text-align: center;
}

.link-name {
    flex: 1;
    font-weight: 400;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-login {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-vpn {
    background-color: rgba(255, 87, 34, 0.2);
    color: #ff5722;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.badge-external {
    background-color: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-internal {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.badge-cloud {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge-staging {
    background-color: rgba(255, 154, 0, 0.2);
    color: #ff9a00;
    border: 1px solid rgba(255, 154, 0, 0.3);
}

/* Subsection titles for grouped links */
.subsection-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.badge-alert {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Scrollbar Styles */
.section-content::-webkit-scrollbar {
    width: 6px;
}

.section-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.section-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.section-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Hide elements during search */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.25rem;
    }
    
    #searchInput {
        width: 200px;
    }
    
    .dashboard-grid {
        padding: 1rem;
        grid-template-columns: 1fr;
    }
    
    .datetime {
        display: none;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-section {
    animation: fadeIn 0.5s ease-out;
}

/* Authentication Gate Styles */
.auth-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auth-modal {
    background-color: var(--bg-secondary);
    border-radius: 1rem;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.auth-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.auth-logo {
    height: 4rem;
    width: auto;
    filter: brightness(1.1);
    margin-bottom: 0.5rem;
}

.auth-content h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.auth-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.login-button {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.login-button:hover {
    background: linear-gradient(135deg, #106ebe, #005a9e);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.4);
}

.login-button i {
    font-size: 1.2rem;
}