.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

/* Widget Base */
.widget {
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, border-color 0.3s;
}

.widget:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.3rem;
}

.widget-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Specific Widgets */
.widget-protocol {
    grid-column: span 4;
}

.widget-scores {
    grid-column: span 4;
}

.widget-forum {
    grid-column: span 4;
}

.widget-news {
    grid-column: span 12;
}

.widget-important {
    grid-column: span 12;
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--neon-pink);
    border-width: 2px;
}

.widget-important .widget-title {
    color: var(--neon-pink);
}

.important-content {
    font-size: 1rem;
    color: #fff;
    line-height: 1.4;
    text-align: center;
    padding: 0.5rem;
}

/* Protocol Widget Content */
.protocol-unit-card {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    display: block;
}

.protocol-unit-card:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--neon-blue);
}

.unit-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.unit-subject {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.unit-meta {
    font-size: 0.85rem;
    color: var(--neon-pink);
}

/* List Items (Scores & Forum) */
.dashboard-list {
    list-style: none;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.list-item:last-child {
    border-bottom: none;
}

.item-main {
    text-decoration: none;
    color: #eee;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.item-main:hover {
    color: var(--neon-blue);
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* News Widget */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid var(--neon-purple);
}

.news-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.news-content {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-news-add {
    background: var(--neon-blue);
    color: #000;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-news-add:hover {
    box-shadow: 0 0 15px var(--neon-blue);
    transform: translateY(-2px);
}

/* Modals */
.p-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    /* Hide by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.p-modal {
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid var(--neon-blue);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.2);
    width: 600px;
    max-width: 95%;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--neon-pink);
}

/* Form Controls */
.fc-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    color: #fff;
    font-family: inherit;
    margin-top: 5px;
    resize: vertical;
}

.fc-input:focus {
    border-color: var(--neon-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 2rem;
}

.cyber-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--neon-blue);
    color: #000 !important;
    font-weight: 800;
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--neon-blue);
    transform: scale(1.02);
}

/* Highscore Marquee Styling */
.highscore-marquee {
    --marquee-speed: 45s;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--neon-blue);
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.marquee-content {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    animation: marquee-scroll var(--marquee-speed) linear infinite;
}

.highscore-marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
    padding: 0 60px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    white-space: nowrap;
}

.m-game {
    color: var(--neon-blue);
    font-weight: bold;
    text-transform: uppercase;
}

.m-user {
    color: #fff;
}

.m-score {
    color: var(--neon-pink);
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-pink);
}

.marquee-divider {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 200;
}