/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
    color: #ffffff;
    background-color: #f0f0f0;
}

/* Topbar styling */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #202225;
    padding: 10px 20px;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
}

/* User info styling */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Portrait mode adjustments */
@media (max-width: 768px) and (orientation: portrait) {
    .sidebar {
        width: 60px;
    }
    .main-content {
        margin-left: 60px;
    }
    .topbar {
        padding: 10px 15px;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
    }
    #username, #botName {
        font-size: 0.9em;
    }
}

/* Landscape mode adjustments */
@media (max-width: 1024px) and (orientation: landscape) {
    .sidebar {
        width: 80px;
    }
    .main-content {
        margin-left: 80px;
    }
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    #username, #botName {
        font-size: 1em;
    }
}

/* Sidebar styling */
.sidebar {
    width: 250px;
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    position: fixed;
    top: 0;
    bottom: 0;
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 2;
}

.sidebar a, .sidebar button {
    padding: 15px;
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    display: flex;
    align-items: center;
    transition: background 0.3s;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.sidebar a i, .sidebar button i {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Hover effect for sidebar items */
.sidebar a:hover, .sidebar button:hover {
    background-color: #4f545c;
}

/* Collapsed sidebar styling */
.sidebar.collapsed {
    width: 60px;
}

#sidebarToggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    margin: 10px;
    cursor: pointer;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed .sidebar-content span,
.sidebar.collapsed #selectedServerName,
.sidebar.collapsed #logout span {
    display: none;
}

.sidebar.collapsed .sidebar-content a,
.sidebar.collapsed .sidebar-content button {
    justify-content: center;
}

.sidebar.collapsed .sidebar-content i {
    margin-right: 0;
}

/* Server logo styling */
.server-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.sidebar.collapsed .server-logo {
    margin-right: 0;
}

/* Adjust main content when sidebar is collapsed */
.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
}

.main-content {
    margin-top: 40px;
    flex-grow: 1;
    padding: 20px;
    background-color: #36393f;
    color: white;
    margin-left: 250px;
}

.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

/* Dropdown menu styling */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2f3136;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    overflow: auto;
    max-height: 200px;
    margin-top: 5px;
    border-radius: 5px;
}

.dropdown-content a {
    color: white;
    padding: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.dropdown-content a i {
    margin-right: 5px;
}

.dropdown-content a:hover {
    background-color: #4f545c;
}

select {
    background-color: #2f3136;
    color: white;
    border: 1px solid #40444b;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    appearance: none;
    outline: none;
}

.select-container {
    position: relative;
    display: inline-block;
}

.select-container::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
}

select:focus {
    border-color: #5865f2;
    box-shadow: 0 0 5px rgba(88, 101, 242, 0.5);
}

.show {
    display: block;
}

#boxes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
}

.command-box {
    background-color: #2f3136;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    color: #ffffff;
}

.command-box h2 {
    margin-bottom: 10px;
}

.command-box2 {
    background-color: #2f3136;
    border-radius: 8px;
    padding: 10px 15px;
    color: #ffffff;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1 1 calc(33.33% - 10px);
    min-width: 180px;
}

.command-box2 i {
    margin-right: 8px;
    font-size: 20px;
}

.command-box2:hover {
    background-color: #4f545c;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.number-input-container {
    margin-top: 10px;
}

.number-input-container label {
    display: block;
    font-size: 0.9em;
    color: #ddd;
    margin-bottom: 5px;
}

.number-input-container input[type="number"] {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #40444b;
    background-color: #2f3136;
    color: white;
    font-size: 1em;
}

/* Fjern Bot-knap styling */
#removeBotButton {
    background-color: #d9534f; /* Rød farve for at indikere en advarsel */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#removeBotButton:hover {
    background-color: #c9302c; /* Mørkere rød ved hover */
}

#removeBotButton i {
    font-size: 1.2em;
}

/* Premium Section Styling */
.premium-section {
    text-align: center;
    color: #ffffff;
    background-color: #36393f; /* Same as .main-content background */
    padding: 40px 20px;
    border-radius: 8px;
    margin: 20px 0;
    width: 100%;
    height: 100%; /* Ensures the section covers available vertical space */
    display: flex;
    flex-direction: column;
    align-items: center;
}


.premium-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #ffffff;
}

.premium-description {
    font-size: 1em;
    color: #ffffff;
    margin-bottom: 30px;
}

.premium-description a {
    color: #ffffff;
    text-decoration: underline;
}

.pricing-cards {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pricing-card {
    background-color: #2f3136;
    padding: 20px;
    border-radius: 10px;
    width: 260px;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.pricing-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.pricing-card p {
    font-size: 0.9em;
    margin-bottom: 20px;
}

.pricing-card .price {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.pricing-card .price small {
    font-size: 0.5em;
    vertical-align: top;
    color: #bdbdbd;
}

.upgrade-button {
    background-color: #ffffff;
    color: #444343;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1em;
    width: 80%;
    margin-top: auto;
}

.upgrade-button:hover {
    background-color: #ffffff59;
}

.popular {
    border: 2px solid #ffb700;
    background-color: #1c1e22;
}

.popular .popular-tag {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffb700;
    color: #000;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 5px;
}

.features-table {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    background-color: #1c1e22;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.features-title {
    background-color: #202225;
    color: #ffffff;
    padding: 15px;
    font-size: 1.5em;
    text-align: center;
}

.features-table table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.features-table th,
.features-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.features-table th {
    background-color: #202225;
    color: #ffdd00;
}

.features-table td {
    background-color: #2f3136;
}

.features-table td i {
    font-size: 1.2em;
}

.features-table tr:last-child td {
    border-bottom: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .premium-section {
        width: 100%;
        min-height: 155vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-sizing: border-box;
        background-color: #36393f;
    }

    /* Title styling */
    .premium-title {
        font-size: 2em;
        text-align: center;
        margin-top: 20px;
        padding: 0 10px;
    }

    /* Description styling */
    .premium-description {
        font-size: 1em;
        text-align: center;
        padding: 0 20px;
        margin-top: 10px;
        line-height: 1.4em;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Smaller Features Table with two-column mobile layout */
    .features-table {
        width: 70%; /* Slightly narrower on mobile */
        max-width: 600px;
    }

    .features-table table,
    .features-table tbody {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .features-table tr {
        display: flex;
        justify-content: space-between;
        padding: 8px; /* Reduced padding */
        background-color: #2f3136;
        border: 1px solid #333;
        border-radius: 8px;
        margin-bottom: 8px; /* Reduced margin between rows */
    }

    .features-table th, .features-table td {
        flex: 1;
        text-align: center;
        padding: 6px 8px; /* Smaller padding for compact design */
        font-size: 0.9em; /* Reduced font size */
    }

    .features-table th {
        background-color: #202225;
        color: #ffdd00;
        font-weight: bold;
    }

    /* Centered text for "Gratis" and "Premium" columns */
    .features-table td[data-label="Gratis"],
    .features-table td[data-label="Premium"] {
        text-align: center;
        padding-left: 0;
    }
}