@font-face {
    font-family: Sora;
    src: url(fonts/Sora.ttf);
}

@font-face {
    font-family: ProdSans;
    src: url(fonts/ProdSans.ttf);
}

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

:root {
    --primary: #351769;
    --primary-hover: #43178a;
    --secondary: #1f2937;
    --secondary-hover: #374151;
    --text: #ffffff;
    --text-muted: #d1d5db;
    --background-start: #180835;
    --background-mid: #1e0b3b;
    --animation-timing: 0.2s ease-in-out;
    --black: #000000;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-start), var(--background-mid), var(--background-start));
    position: relative;
    overflow-x: hidden;
}

.grid-bg {
    position: fixed;
    inset: 0;
    opacity: 0.1;
    background-image: 
        linear-gradient(#ffffff 1px, transparent 1px),
        linear-gradient(90deg, #ffffff 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: ProdSans;
}

.logo-s {
    color: var(--primary);
    margin-right: 0.25rem;
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: Sora, ProdSans;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    transition: all var(--animation-timing);
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: var(--primary);
}

main {
    position: relative;
    z-index: 10;
    padding: 5rem 2rem 2rem;
    opacity: 0;
    min-height: 100vh;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.dashboard {
    display: flex;
    gap: 2rem;
    max-width: 1800px;
    margin: 0 auto;
    height: calc(100vh - 100px);
}

.sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1.5rem;
    height: min-content;
    position: sticky;
    top: 6rem;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-family: Sora, ProdSans;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--animation-timing);
    font-size: 1.1rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary);
    color: var(--text);
    transform: translateX(5px);
}

.dashboard-content {
    flex: 1;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 2rem;
    overflow-y: auto;
    padding-right: 1rem;
    height: 100%;
}

.option {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--animation-timing);
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--card-bg);
}

.option h2 {
    font-family: Sora, ProdSans;
    color: var(--text)
}

.holder {
    flex: 1;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 2rem;
    overflow-y: auto;
    padding-right: 1rem;
    height: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Sora, ProdSans;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Sora, ProdSans;
}

.dashboard-header h1 {
    color: var(--text);
    font-size: 2rem;
}

.holder h1 {
    color: var(--text);
    font-size: 2rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.notifications {
    position: relative;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    transition: color var(--animation-timing);
}

.notifications:hover {
    color: var(--text);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: var(--text);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color var(--animation-timing);
    margin-top: 0.5rem;
}

.user-profile h2 {
    font-weight: 350;
    font-family: ProdSans;
    margin: 0.5rem 0 0.25rem;
}

.user-profile .role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.tab-content {
    display: none;
    opacity: 0;
    color: var(--text);
    font-family: Sora, ProdSans;
    transform: translateY(-20px);
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.textbox {
    background-color: #111;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    color: white;
    font-size: 16px;
    width: 300px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.textbox:focus {
    border-color: #666;
    box-shadow: 0 0 10px #351769;
}

.glow-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background-color: #351769;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    transform: translateY(-8px);
    font-family: Sora, ProdSans;
}

.glow-button:hover {
    background-color: #4b2986;
    box-shadow: 0 0 20px #442875;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    margin-bottom: 15px;
}

.close-button {
    background-color: #666;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.close-button:hover {
    background-color: #888;
}

.username {
    color: var(--text);
    font-size: 1.1rem;
    font-family: Sora, ProdSans;
}

.rank {
    color: var(--text);
    font-size: 0.7rem;
    font-family: Sora, ProdSans;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all var(--animation-timing);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text);
}

.stat-details h3 {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stat-details {
    font-family: Sora, ProdSans;
}

.stat-value {
    color: var(--text);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 1rem;
    color: var(--text-muted);
}

.stat-change.positive {
    color: #10b981;
}

.chart-container {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2rem;
    height: 400px;
}

.chart-wrapper {
    position: relative;
    height: calc(100% - 50px);
    width: 100%;
}

.activity-feed {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    font-family: Sora, ProdSans;
}

.activity-item {
    display: flex;
    align-items: flex-start; 
    gap: 1.25rem;  
    padding: 1.25rem 1.5rem;  
    background: var(--card-bg);
    border-radius: 8px;
    transition: all var(--animation-timing);
}

.activity-details {
    flex: 1;
    padding: 0.25rem 0; 
}

.activity-text {
    color: var(--text);
    margin-bottom: 0.75rem;  
    font-size: 1.1rem;
    line-height: 1.4;  
}

.activity-description {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 1rem;  
    line-height: 1.4;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem; 
}

.activity-item:hover {
    transform: translateX(5px);
    background: var(--card-hover);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-container h2,
.activity-feed h2 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.25rem;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 1200px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        position: static;
        width: 100%;
    }
    
    .dashboard-content {
        padding-right: 0;
    }

    .tab-content {
        padding-right: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    main {
        padding: 4.5rem 1rem 1rem;
    }

    .dashboard {
        gap: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .chart-container,
    .activity-feed {
        padding: 1.5rem;
    }

    .chart-container h2,
    .activity-feed h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .activity-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .activity-text {
        font-size: 1rem;
    }

    .activity-description {
        font-size: 1rem;
    }
    .activity-item {
        padding: 1.25rem; 
        gap: 1rem;
    }

    .activity-text,
    .activity-description {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .user-profile h2 {
        font-size: 1rem;
    }

    .user-profile .role {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .user-menu {
        gap: 1rem;
    }

    .username {
        display: none;
    }

    .rank {
        display: none;
    }

    .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .chart-container {
        height: 300px;
    }

    .activity-list {
        max-height: 350px;
    }
}

.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

@media (prefers-color-scheme: dark) {
    .stat-card,
    .chart-container,
    .activity-feed,
    .sidebar,
    .activity-item {
        background: rgba(0, 0, 0, 0.3);
    }

    nav {
        background: rgba(0, 0, 0, 0.3);
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary: #4a1d99;
        --text-muted: #b8bcc2;
    }

    .grid-bg {
        opacity: 0.15;
    }

    .stat-card,
    .chart-container,
    .activity-feed,
    .sidebar,
    .activity-item {
        background: rgba(0, 0, 0, 0.4);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .activity-item:hover,
    .sidebar-link:hover,
    .stat-card:hover {
        transform: none;
    }
}
@media print {
    .grid-bg,
    .sidebar,
    .notifications,
    .user-profile {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .dashboard {
        display: block;
    }

    .chart-container,
    .activity-feed,
    .stat-card {
        break-inside: avoid;
        background: none;
        border: 1px solid #ccc;
    }
}