:root[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --border-color: #38383a;
    --header-bg: rgba(28, 28, 30, 0.8);
    --card-bg: rgba(44, 44, 46, 0.8);
    --nav-bg: rgba(28, 28, 30, 0.9);
    --button-bg: #0a84ff;
    --button-hover: #0071e3;
    --icon-filter: invert(1);
}

:root[data-theme="light"] {
    --bg-color: #f2f2f7;
    --text-color: #000000;
    --border-color: rgba(60, 60, 67, 0.1);
    --header-bg: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(255, 255, 255, 0.8);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --button-bg: #007AFF;
    --button-hover: #0056b3;
    --icon-filter: invert(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 16px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}

nav {
    background-color: var(--nav-bg);
    padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 0.5px solid var(--border-color);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 12px;
}

nav ul li a {
    text-decoration: none;
    color: var(--button-bg);
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}
#theme-toggle {
    right: max(24px, env(safe-area-inset-right)); /* Increased right margin */
}

/* OR */

nav ul li {
    margin-right: 10px;  /* Add right margin to nav items */
}
nav ul li:last-child {
    margin-right: 0;   /* Remove right margin from the last item */

}

.header {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--header-bg);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

.header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.submission-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.submission-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.submission-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.submission-link {
    display: inline-block;
    background: var(--button-bg);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.submission-link:hover {
    background: var(--button-hover);
}

#theme-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

#theme-toggle img {
    width: 20px;
    height: 20px;
    filter: var(--icon-filter);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    padding: 1rem;
    text-align: center;
    font-size: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 0.5px solid var(--border-color);
}

footer a {
    color: #ffffff; /* Ensure the link text stays white */
    text-decoration: none; /* Remove underline */
}

footer a:hover {
    color: #ffffff; /* Keep the text white on hover */
    text-decoration: underline; /* Add underline on hover */
}


nav {
    /* Existing styles */
}

@media (max-width: 600px) { /* Adjust breakpoint as needed */
    nav ul {
        flex-wrap: wrap; /* Allow items to wrap onto multiple lines */
        justify-content: flex-start; /* Align items to the left */
        overflow-x: auto; /* Enable horizontal scrolling if needed */
        padding-bottom: 1rem; /* Add some spacing */
    }
    nav ul li {
        white-space: nowrap; /* Prevent items from breaking onto multiple lines*/
    }
    nav ul li a {
        font-size: 14px; /* Slightly reduce font size */
        padding: 6px 10px; /* Slightly reduce padding */
    }
}
@media (max-width: 768px) {
    .header{
        margin-top: 130px;
    }
}
/* From Uiverse.io by SpatexDEV */
.submit-a{
    width: 100px;
    border: none;
    display: flex;
    padding: 0.75rem 1.5rem;
    background-color: #488aec;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
    vertical-align: middle;
    align-items: center;
    border-radius: 0.5rem;
    user-select: none;
    gap: 0.75rem;
    box-shadow:
            0 4px 6px -1px #488aec31,
            0 2px 4px -1px #488aec17;
    transition: all 0.6s ease;
}

.submit-a:hover {
    box-shadow:
            0 10px 15px -3px #488aec4f,
            0 4px 6px -2px #488aec17;
}

.submit-a:focus,
.submit-a:active {
    opacity: 0.85;
    box-shadow: none;
}

.submit-a svg {
    width: 1.25rem;
    height: 1.25rem;
}
