
/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background-color: #f5f5f5;
    --card-background: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --link-color: #007bff;
    --switch-bg: #ffffff;
    --switch-border: #cccccc;
}

/* Data theme attribute overrides system preference */
[data-theme="dark"] {
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --link-color: #66b0ff;
    --switch-bg: #2d2d2d;
    --switch-border: #444444;
}

/* Theme Switch Styles */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--switch-bg);
    border: 1px solid var(--switch-border);
    border-radius: 20px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s ease;
}

.theme-switch:hover {
    transform: translateY(-2px);
}

.theme-switch-icon {
    font-size: 18px;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

/* Header styling */
header {
    background-color: var(--background-color);
    color: var(--text-primary);
    padding: 10px 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1rem;
}

header img {
    width: 100px;
    display: block;
    margin: 20px auto;
    border-radius: 0%; /*round image*/
}

nav a:hover {
    text-decoration: underline;
}

/* Gallery List Styles */
.gallery-list {
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-list h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.folder-list {
    list-style: none;
}

.folder-item {
    background-color: var(--card-background);
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.2s, background-color 0.3s ease;
    overflow: hidden;
}

.folder-item:hover {
    transform: translateY(-3px);
}

.folder-link {
    display: flex;
    text-decoration: none;
    color: var(--text-primary);
}

.folder-thumbnail {
    width: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.folder-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.folder-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.folder-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.folder-count {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Gallery Page Styles */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--link-color);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.image-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    background-color: var(--card-background);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.image-item:hover img {
    transform: scale(1.05);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .folder-link {
        flex-direction: column;
    }

    .folder-thumbnail {
        width: 100%;
    }

    .folder-info {
        padding: 15px;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    nav {
          display: flex;
          flex-direction: column;
          gap: 10px;
    }
}