:root {
    --scrollbar-track-color: #f5f5f5;
    --scrollbar-thumb-color: #e9ba5b;
    --scrollbar-thumb-hover: #f4b334;
    --scrollbar-thumb-border: #fdf6e3;
}

body.dark-mode {
    --scrollbar-track-color: #1f1f1f;
    --scrollbar-thumb-color: #e9ba5b;
    --scrollbar-thumb-hover: #f4b334;
    --scrollbar-thumb-border: #2a2a2a;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 10px;
    border: 2px solid var(--scrollbar-thumb-border);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
    background-color: var(--scrollbar-track-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #212529;
}

.navbar {
    background: linear-gradient(135deg, #f4b334, #e9ba5b);
    color: white;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100px;
    position: relative;
}

.navbar .center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: bold;
    white-space: nowrap;
    color: white;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    white-space: nowrap;
}

.logo img {
    display: block;
    margin: 0 auto;
    max-width: 100px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    height: 100%;
    align-items: center;
}

.navbar .fa-bars {
    font-size: 2rem;
}

.navbar .fa-bell {
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar .fa-bell.has-new::after {
    content: '';
    position: absolute;
    top: 30px;
    right: 5px;
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
}

.nav-links > a, .dropdown > a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.nav-links a:hover, .dropdown:hover > a {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content,
.alert-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    background-color: white;
    min-width: 230px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    z-index: 1;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.dropdown-content a,
.alert-dropdown-content a {
    color: #212529;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content-active,
.alert-dropdown-content-active {
    background-color: #e9ba5b;
}

.dropdown-content a:hover,
.alert-dropdown-content a:hover {
    background-color: #e0bd77;
}

.dropdown:hover .dropdown-content,
.dropdown:hover .alert-dropdown-content {
    display: block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 10;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.page-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
}

.side-fk-pic {
    flex: 0 0 120px;
}

.side-fk-pic img {
    width: 300px;
    height: auto;
    display: block;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.card h1 {
    color: #f4b334;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card a {
    color: #f4b334;
    text-decoration: none;
}

button {
    background-color: #f4b334;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.off {
    background-color: #f43434;
}

button:hover {
    background-color: #e9ba5b;
}

button.off:hover {
    background-color: #e95b5b;
}

.driver-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: flex-start;
}

.driver-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    width: 250px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.driver-card:hover {
    transform: scale(1.03);
}

.driver-card.danger {
    border: 2px solid #e15f5f;
    background-color: #ffeaea;
}

.driver-card.danger h3 {
    color: #e15f5f;
}

.driver-card h3 {
    color: #f4b334;
}

.driver-card p {
    margin: 6px 0;
    font-size: 14px;
    color: #333;
}

.driver-card img {
    max-width: 250px;
    height: auto;
    object-fit: contain;
    display: block;
}

.infos-container {
    flex: 1;
    padding: 2rem 3rem;
    display: flex;
    justify-content: center;
}

.news-wrapper {
    width: 100%;
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.infos-header h1 {
    text-align: left;
    font-size: 2rem;
    color: #f4b334;
    margin-bottom: 1.5rem;
}

.news-post {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-post:last-child {
    border-bottom: none;
}

.news-post h2 {
    color: #f4b334;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.news-content {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.news-image {
    width: 100%;
    max-width: 300px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.news-image:hover {
    opacity: 0.7;
}

.news-date {
    font-size: 0.875rem;
    color: #777;
}

.no-news {
    color: #999;
    font-style: italic;
    margin-top: 1rem;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 999;
    inset: 0;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
  
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    display: block;
    margin: auto;
}
  
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    object-fit: contain;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ddd;
}

.site-footer {
    background: linear-gradient(to right, #f4b334, #e9ba5b);
    color: white;
    padding: 20px 30px 15px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    text-align: center;
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.footer-container {
    max-width: 300px;
    margin: 0 auto;
}

.footer-copy {
    opacity: 0.9;
    font-size: 13px;
}

/* Dark mode */

body.dark-mode {
    background-color: rgb(18, 18, 18);
}

body.dark-mode .popup,
body.dark-mode .dropdown-content,
body.dark-mode .dropdown-content a {
    background-color: rgb(50, 50, 50) !important;
    color: #fff;
}

body.dark-mode .dropdown-content a.dropdown-content-active {
    background-color: #e9ba5b !important;
}

body.dark-mode .dropdown-content a:hover {
    background-color: #e0bd77 !important;
}

body.dark-mode .navbar,
body.dark-mode .navbar .center-title,
body.dark-mode .nav-links > a, .dropdown > a {
    color: #fff;
}

body.dark-mode .card,
body.dark-mode .news-wrapper {
    color: #fff;
    background-color: rgb(30, 30, 30) !important;
    border-radius: 8px;
}

body.dark-mode .news-wrapper {
    background-color: rgb(30, 30, 30) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
}

body.dark-mode .driver-card.danger {
    border: 2px solid #e15f5f;

}

body.dark-mode .driver-card,
body.dark-mode .news-post {
    background-color: rgb(50, 50, 50) !important;
    border: 1px solid #f4b4343e;
    border-radius: 8px;
}

body.dark-mode .driver-card p,
body.dark-mode .news-post content,
body.dark-mode .news-content{
    color: #ccc;
}

#theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

/* Dark mode vég */

@media (max-width: 768px) {
    .center-title {
        display: none !important;
    }   

    .menu-toggle {
        display: flex;
    }

    #profile-dropdown > a {
        display: none;
    }
    
    .nav-links {
        overflow-y: auto;
        position: fixed;
        top: 100px;
        left: -100%;
        width: 70%;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #f4b334, #e9ba5b);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 0;
        transition: left 0.3s ease;
        z-index: 9;
    }

    .navbar .fa-bars {
        font-size: 1.5rem;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links > a, .dropdown > a {
        width: 100%;
        padding: 1rem;
        height: auto;
    }

    .navbar h1,
    .nav-links #timer,
    .alert-dropdown-content {
        display: none;
    }
    
    .dropdown {
        width: 100%;
        flex-direction: column;
        height: auto;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        background: inherit;
        border: none;
        box-shadow: none;
        display: none;
        border-radius: 0;
    }

    .dropdown-content a {
        color: #f8f9fa;
    }

    .dropdown-content-active {
        background-color: #f4b334
    }
    
    .dropdown-content a:hover {
        background-color: #e9ba5b;
    }
    
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .welcome-card {
        padding: 1rem;
    }
    
    .modern-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .side-fk-pic {
        display: none !important;
    }

    .driver-card {
        width: 100%;
        max-width: 100%;
    }

    .infos-container {
        padding: 1rem;
    }

    .news-wrapper {
        padding: 1rem;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 28px;
    }

    .site-footer {
        padding: 15px 20px 10px;
        font-size: 13px;
    }

    .footer-container {
        max-width: 90%;
        padding: 0;
    }

    .footer-copy {
        font-size: 12px;
        line-height: 1.4;
    }

    body.dark-mode .dropdown-content a {
        background-color: #f4b334 !important;
        color: #f8f9fa !important;
    }
    
    body.dark-mode .dropdown-content a:hover {
        background-color: #f4b334 !important;
    }
}

@media (min-width: 769px) {
    .modern-btn {
        width: auto;
    }
}