/* styles.css - Full file with all theme variables and base styles */
/* Theme Variables */
:root {
    /* Regular Theme (Default) */
    --bg-color: #f0f0f0;
    --panel-bg: #ffffff;
    --border-color: #333333;
    --button-bg: #e0e0e0;
    --button-hover: #d0d0d0;
    --accent-1: #4a90e2;
    --accent-2: #5da8ff;
    --accent-3: #50c878;
    --delete-color: #e24a4a;
    --text-color: #000000;
    --input-bg: #ffffff;
    --input-text: #000000;
    --list-even: #f8f8f8;
    --tab-inactive-bg: #e0e0e0;
    --tab-active-bg: #4a90e2;
    --tab-hover-bg: #c0c0c0;
    --scrollbar-track: #333333;
    --scrollbar-thumb: #4a90e2;
    --scrollbar-thumb-hover: #5da8ff;
    --info-bg: #ffffff;
    --info-title-bg: #4a90e2;
    --info-title-text: #ffffff;
    --result-bg: #fafafa;
    --result-border: #e0e0e0;
    --success-color: #28a745;
}

.theme-high-contrast {
    --bg-color: #ffffff;
    --panel-bg: #ffffff;
    --border-color: #000000;
    --button-bg: #ffffff;
    --button-hover: #000000;
    --accent-1: #000000;
    --accent-2: #333333;
    --accent-3: #000000;
    --delete-color: #000000;
    --text-color: #000000;
    --input-bg: #ffffff;
    --input-text: #000000;
    --list-even: #f0f0f0;
    --tab-inactive-bg: #d0d0d0;
    --tab-active-bg: #000000;
    --tab-hover-bg: #aaaaaa;
    --scrollbar-track: #ffffff;
    --scrollbar-thumb: #000000;
    --scrollbar-thumb-hover: #333333;
    --info-bg: #ffffff;
    --info-title-bg: #000000;
    --info-title-text: #ffffff;
    --result-bg: #ffffff;
    --result-border: #000000;
    --success-color: #000000;
}

.theme-dark {
    --bg-color: #1a1a1a;
    --panel-bg: #2d2d2d;
    --border-color: #404040;
    --button-bg: #404040;
    --button-hover: #505050;
    --accent-1: #4a90e2;
    --accent-2: #5da8ff;
    --accent-3: #50c878;
    --delete-color: #ff6b6b;
    --text-color: #ffffff;
    --input-bg: #404040;
    --input-text: #ffffff;
    --list-even: #363636;
    --tab-inactive-bg: #404040;
    --tab-active-bg: #4a90e2;
    --tab-hover-bg: #505050;
    --scrollbar-track: #404040;
    --scrollbar-thumb: #4a90e2;
    --scrollbar-thumb-hover: #5da8ff;
    --info-bg: #2d2d2d;
    --info-title-bg: #4a90e2;
    --info-title-text: #ffffff;
    --result-bg: #383838;
    --result-border: #505050;
    --success-color: #50c878;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: var(--bg-color);
    padding: 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
    min-height: 100vh;
    position: relative;
}

/* Corner Buttons */
.corner-btn {
    position: absolute;
    padding: 8px 16px;
    background-color: var(--accent-1);
    color: white;
    text-decoration: none;
    border: 2px solid var(--border-color);
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
    border-radius: 0;
}

.corner-btn:hover {
    background-color: var(--accent-2);
}

.return-btn {
    top: 20px;
    left: 20px;
}

.theme-btn {
    top: 20px;
    right: 20px;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 55px auto 20px;
    background-color: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.title-bar {
    background-color: var(--accent-1);
    color: white;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    flex-shrink: 0;
}

/* About Page Styles */
.about-content {
    padding: 30px 40px;
    max-width: 1100px;
    margin: 0 auto;
    flex-grow: 1;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    color: var(--accent-1);
    font-size: 24px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--accent-1);
    font-weight: bold;
}

.about-section p {
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-color);
}

.about-section a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 500;
}

.about-section a:hover {
    text-decoration: underline;
}

/* Category Boxes */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-box {
    background-color: var(--list-even);
    border: 2px solid var(--border-color);
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.category-box:hover {
    border-color: var(--accent-1);
}

.category-box h3 {
    color: var(--accent-1);
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-color);
}

.category-box p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 0;
    color: var(--text-color);
}

/* Template Content Styles */
.template-content {
    padding: 30px;
    min-height: 500px;
    flex-grow: 1;
}

.template-content h2 {
    color: var(--accent-1);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-1);
}

.template-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.template-features {
    margin-top: 25px;
    padding: 15px;
    background-color: var(--list-even);
    border-left: 4px solid var(--accent-1);
}

.template-features h3 {
    margin-bottom: 10px;
    color: var(--accent-2);
}

.template-features ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.template-features li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Info Section */
.info-section {
    width: 900px;
    height: 350px;
    margin: 20px auto 20px;
    border: 2px solid var(--border-color);
    background-color: var(--info-bg);
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.info-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--list-even);
    flex-shrink: 0;
}

.info-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: var(--tab-inactive-bg);
    border: none;
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-color);
    transition: all 0.2s ease;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
}

.info-tab-btn:last-child {
    border-right: none;
}

.info-tab-btn:hover {
    background-color: var(--tab-hover-bg);
}

.info-tab-btn.active {
    background-color: var(--tab-active-bg);
    color: white;
}

.info-tab-content {
    display: none;
    padding: 20px;
    flex: 1;
    overflow: hidden;
}

.info-tab-content.active {
    display: block;
}

.info-content-scroll {
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling */
.info-content-scroll::-webkit-scrollbar {
    width: 8px;
}

.info-content-scroll::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    opacity: 0.3;
}

.info-content-scroll::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 1px solid var(--border-color);
}

.info-content-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.info-content-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.info-content-scroll h4 {
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--border-color);
    color: var(--accent-1);
    font-size: 16px;
}

.info-content-scroll h4:first-of-type {
    margin-top: 0;
}

.info-content-scroll p {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 13px;
    color: var(--text-color);
}

.info-content-scroll ul {
    margin: 8px 0 12px 25px;
    line-height: 1.5;
    font-size: 13px;
    color: var(--text-color);
}

.info-content-scroll li {
    margin-bottom: 4px;
}

.info-content-scroll strong {
    color: var(--accent-1);
}

.info-content-scroll a {
    color: var(--accent-1);
    text-decoration: none;
    font-size: 13px;
}

.info-content-scroll a:hover {
    text-decoration: underline;
}

/* Footer */
.footer-container {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
    padding: 12px;
}

.copyright-footer {
    margin-bottom: 8px;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--accent-1);
    text-decoration: none;
    font-size: 13px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Button Styles */
button {
    padding: 8px 12px;
    background: var(--button-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s ease;
    border-radius: 0;
}

button:hover {
    background: var(--button-hover);
}

button:active {
    transform: translate(1px, 1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        max-width: 95%;
    }
    
    .info-section {
        width: 95%;
        max-width: 900px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .corner-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .return-btn {
        top: 10px;
        left: 10px;
    }
    
    .theme-btn {
        top: 10px;
        right: 10px;
    }
    
    .main-container {
        margin-top: 50px;
        max-width: 100%;
    }
    
    .about-content {
        padding: 20px;
    }

    .about-section h2 {
        font-size: 20px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .template-content {
        padding: 15px;
        min-height: 350px;
    }
    
    .info-section {
        width: 100%;
        height: 350px;
        max-width: 100%;
    }
    
    .info-tabs {
        flex-direction: column;
    }
    
    .info-tab-btn {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .info-tab-btn:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .title-bar {
        font-size: 16px;
        padding: 10px;
    }
    
    .about-content {
        padding: 15px;
    }

    .about-section h2 {
        font-size: 18px;
    }

    .about-section p {
        font-size: 13px;
    }

    .category-box {
        padding: 14px;
    }
    
    .template-content {
        padding: 15px;
        min-height: 300px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .info-tab-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .info-section {
        height: 400px;
    }
}