/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #000000;
    --secondary-color: #000000;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --text-color: #000000;
    --footer-background: #ffffff;
    --accent-color: transparent;
    --overlay-color: rgba(0, 0, 0, 0.5);
    --dark-background-color: #121212;
    --dark-card-background: #1e1e1e;
    --dark-text-color: #c0c0c0;
    --border-color: #000000;
    --dark-border-color: #c0c0c0;
    --light-button-bg: #f0f0f0;
    --dark-button-bg: #333;
    --button-hover-bg: #ccc;
    --dark-button-hover-bg: #555;
}

html {
    position: relative;
    min-height: 100%;
    background: var(--background-color);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: var(--background-color);
    color: var(--text-color);
    width: 100%;
    overflow-x: hidden;
}

body.dark-theme {
    background: var(--dark-background-color);
    color: var(--dark-text-color);
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    width: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: -1;
}

.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 10px;
}


.logo-and-wordmark .wordmark {
    width:200px; /* Increased width */
    height: 300px; /* Increased height */
    background: url(./images/cannki.svg) no-repeat center/contain;
    margin-left: 10px;

}


/* Product Box Styles */
section.top-sites {
    width: 100%;
    max-width: 1000px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Adjusted min-width for better layout */
    gap: 10px;
    border-radius: 15px;
    background: var(--card-background);
    box-shadow: 0 4px 8px var(--card-shadow);
    animation: fadeInUp 1s ease-in-out;
}

body.dark-theme section.top-sites {
    background: var(--dark-card-background);
}

.top-sites-list {
    list-style: none;
    display: contents;
}

.top-site-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease-in-out;
}

.top-site-outer:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px var(--card-shadow);
    background: var(--accent-color);
}

.top-site-inner {
    text-align: center;
    width: 100%;
    background: var(--card-background);
    box-shadow: 0 2px 4px var(--card-shadow);
    border-radius: 8px;
    padding: 10px;
    transition: background 0.3s ease, color 0.3s ease;
    animation: zoomIn 1s ease-in-out;
}

body.dark-theme .top-site-inner {
    background: var(--dark-card-background);
}

.top-site-inner:hover {
    background: var(--accent-color);
    color: var(--text-color);
}

body.dark-theme .top-site-inner:hover {
    color: var(--dark-text-color);
}

.top-site-inner a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.top-site-inner:hover a {
    color: var(--text-color);
}

body.dark-theme .top-site-inner:hover a {
    color: var(--dark-text-color);
}

.top-site-inner .tile {
    margin-bottom: 5px;
    animation: bounceIn 1s ease-in-out;
    position: relative;
}

.top-site-inner .tile .icon {
    width: 40px;
    height: 40px;
    display: none;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

body:not(.dark-theme) .top-site-inner .tile .light-icon {
    display: block;
}

body.dark-theme .top-site-inner .tile .dark-icon {
    display: block;
}

.top-site-inner:hover .tile .icon {
    transform: scale(1.1);
}

.top-site-inner .title {
    font-size: 16px; /* Increased font size for the product titles */
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

body.dark-theme .top-site-inner .title {
    color: var(--dark-text-color);
}

/* Footer Styles */


body.dark-theme footer {
    background: var(--dark-background-color);
    color: var(--dark-text-color);
    border-color: var(--dark-border-color);
}

footer a {
    color: var(--text-color);
    text-decoration: none;
}

body.dark-theme footer a {
    color: var(--dark-text-color);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-right p {
    margin: 0;
    font-size: 12px;
}

body.dark-theme .footer-right p {
    color: var(--dark-text-color);
}

body.dark-theme .footer-bottom .reset-button:hover {
    background-color: var(--dark-button-hover-bg);
}

.footer-bottom .theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-toggle input {
    display: none;
}

.theme-toggle-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    background: var(--light-button-bg);
    border-radius: 20px;
    padding: 5px;
    position: relative;
    width: 50px;
    height: 25px;
    border: 2px solid var(--border-color);
}

body.dark-theme .theme-toggle-label {
    background: var(--dark-button-bg);
}

.theme-toggle-icon {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 5px;
    transition: left 0.3s;
}

.theme-toggle input:checked + .theme-toggle-label .theme-toggle-icon {
    left: 25px;
}

.theme-toggle-label::after {
    content: '🌙';
    font-size: 14px;
    position: absolute;
    right: 5px;
    transition: opacity 0.3s;
    opacity: 1;
}

.theme-toggle input:checked + .theme-toggle-label::before {
    opacity: 1;
}

.theme-toggle input:checked + .theme-toggle-label::after {
    opacity: 0;
}


body.dark-theme .taskbar {
    background: var(--dark-background-color);
    border-color: var(--dark-border-color);
}


body.dark-theme .datetime {
    color: var(--dark-text-color);
}

@media (max-width: 600px) {
    .logo-and-wordmark .logo,
    .logo-and-wordmark .wordmark {
        width: 80px; /* Increased width */
        height: 80px; /* Increased height */
    }
    h2 {
        font-size: 18px;
    }
    section.top-sites {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}
