/**
 * Style for Prk's Code Snippet
 * @author Prk
 */

:root {
    --bg-color: #F5F5F5;
    --text-color: #333333;
    --card-bg: #FFFFFF;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    --header-color: #2C3E50;
    --footer-bg: #2C3E50;
    --footer-color: #FFFFFF;
}

[data-theme="dark"] {
    --bg-color: #1A1A1A;
    --text-color: #F5F5F5;
    --card-bg: #2C2C2C;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, .3);
    --header-color: #E0E0E0;
    --footer-bg: #2C2C2C;
    --footer-color: #E0E0E0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: none;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.2s ease;
}

h1, h3, p, span, .card, footer {
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

h1 {
    font-size: 3rem;
    color: var(--header-color);
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #CCCCCC;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform .3s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

.card:hover {
    cursor: pointer;
    transform: translateY(-5px);
}

.card img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer a {
    color: var(--footer-color);
    text-decoration: none;
    transition: all .2s ease;
}

footer a:hover {
    text-decoration: underline;
    color: var(--footer-color);
    font-weight: bold;
}

@media screen and (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1025px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
