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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

h1, h2, h3, h4 {
    color: #2c3e50;
}

/* Layout */
header, main, footer {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #67B26F 0%, #4ca2cd 100%);
    color: white;
    border-radius: 0 0 10px 10px;
}

header h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
}

/* Introduction Section */
#introduction {
    text-align: center;
    padding: 3rem 1rem;
}

#introduction h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #3498db;
}

#introduction p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Buttons */
.primary-button {
    background: #3498db;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Game container */
#game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #95a5a6;
}

.tab-button:hover {
    color: #3498db;
}

.tab-button.active {
    color: #3498db;
    font-weight: bold;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3498db;
}

/* Game Areas */
.game-area {
    display: none;
    padding: 1rem 0;
}

.game-area.active {
    display: block;
}

.game-area h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.game-area p {
    margin-bottom: 1.5rem;
    color: #7f8c8d;
}

/* Interactive Area Layout */
.interactive-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.controls {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    display: inline-grid;

}

.display-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.canvas-container {
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-panel {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.info-panel h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

/* Helper Classes */
.hidden {
    display: none;
}

/* Pixel Zoom Specific Styles */
#sample-image {
    width: 100%;
    height: 100%;
    display: block;
}

#zoom-area {
    position: absolute;
    border: 2px solid #e74c3c;
    width: 50px;
    height: 50px;
    pointer-events: none;
}

#zoomed-view {
    width: 100%;
    height: 100%;
    border: 3px solid #3498db;
    background-color: white;
    overflow: hidden;
    margin-top: 15px;
    border-radius: 4px;
}

.zoomed-view-container {
    margin-top: 15px;
}

.zoom-label {
    font-weight: bold;
    color: #3498db;
    margin-top: 15px;
    display: block;
}

/* Color Mixer Specific Styles */
.color-slider-container {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.color-slider-container label {
    width: 60px;
    display: inline-block;
}

.color-slider-container input[type="range"] {
    flex: 1;
    margin: 0 15px;
}

#color-display {
    width: 200px;
    height: 200px;
    border: 3px solid #ddd;
    margin: 0 auto;
}

/* Updated Color Mixer Specific Styles with RGB subpixels */
#pixel-grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 300px;
    height: 300px;
    margin: 20px auto 0;
    gap: 2px;
    background-color: #333;
    padding: 2px;
    border-radius: 4px;
}

.pixel-container {
    background-color: #000;
    display: flex;
    border: 1px solid #555;
    width: 100%;
    height: 100%;
}

.subpixel {
    flex: 1;
    height: 100%;
}

/* Add a subtle separator between subpixels */
.red-subpixel, .green-subpixel {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Resolution Explorer Specific Styles */
#resolution-display {
    width: 100%;
    /* height: 300px; */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Upload Button Styles */
.upload-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.upload-button {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.hidden-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-container {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

.color-red {
    width: 1rem;       
    height: 1rem;     
    background-color: red;
    border: 2px solid rgb(206, 20, 20); 
    border-radius: 5px;
}
.color-green {
    width: 1rem;       
    height: 1rem;     
    background-color: #00ff00;
    border: 2px solid rgb(7, 202, 157); 
    border-radius: 5px;
}
.color-blue {
    width: 1rem;       
    height: 1rem;     
    background-color: #0000ff;
    border: 2px solid rgb(25, 13, 152); 
    border-radius: 5px;
}
