/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header Styles */
/*     background: linear-gradient(135deg, #3a7bd5, #00d2ff); */
.header {
    background: linear-gradient(135deg, #3a7bd5, #1C7ED6);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    padding: 1.5rem 0;
}

.ad-section {
    width: 200px;
    padding: 1rem;
    background-color: #f1f3f5;
    align-self: flex-start;
    position: sticky;
    top: 20px;
}

.left-ad {
    order: 1;
}

.right-ad {
    order: 3;
}

.color-generator {
    flex: 1;
    order: 2;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 0 1rem;
}

.color-generator h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.tool-description {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 1.05rem;
    padding: 0.5rem;
    background-color: #f1f3f5;
    border-radius: 6px;
}

.ad-placeholder {
    height: 600px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: bold;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Color Palette Styles */
.color-palette-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-auto-rows: 50px;
    gap: 8px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    min-height: 400px;
    padding: 10px;
    background-color: #f8f9fa;
}

.color-cell {
    transition: all 0.2s ease;
    position: relative;
    border-radius: 6px;
}

.color-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-cell.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px #4dabf7;
    z-index: 20;
}

.color-info {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.color-display {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.color-values {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.value-box {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.value-box label {
    width: 80px;
    font-weight: 600;
    color: #343a40;
    font-size: 1.2rem;
}

.value {
    flex: 1;
    padding: 0.9rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.copy-btn {
    padding: 0.9rem 1.5rem;
    background-color: #4dabf7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    min-width: 100px;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.copy-btn:hover {
    background-color: #339af0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(77, 171, 247, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

.reset-btn {
    padding: 1.1rem 2.2rem;
    background: linear-gradient(135deg, #ff6b6b, #f03e3e);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    margin: 1.5rem auto 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(240, 62, 62, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(240, 62, 62, 0.4);
    background: linear-gradient(135deg, #ff8787, #f03e3e);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #3a4a6d, #5b7cb6);
    color: white;
    padding: 3rem 2rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.developer-text {
    font-weight: 600;
    margin-bottom: 1.8rem;
    font-size: 1.3rem;
    text-align: center;
}

.footer-about {
    text-align: center;
    line-height: 1.8;
}

.footer-about p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.copyright {
    margin-top: 2rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .ad-section {
        width: 160px;
    }
}

@media (max-width: 1200px) {
    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        grid-auto-rows: 45px;
    }
    
    .color-display {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 992px) {
    .ad-section {
        display: none;
    }
    
    .color-generator {
        margin: 0;
    }
    
    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        grid-auto-rows: 50px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .color-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .color-display {
        width: 120px;
        height: 120px;
    }
    
    .value-box {
        width: 100%;
    }
    
    .footer {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        grid-auto-rows: 40px;
        gap: 6px;
    }
    
    .value {
        font-size: 1rem;
        padding: 0.7rem;
    }
    
    .copy-btn {
        padding: 0.7rem 1rem;
        min-width: 80px;
        font-size: 1rem;
    }
    
    .reset-btn {
        padding: 1rem 1.8rem;
        font-size: 1.1rem;
    }
    
    .footer-about p {
        font-size: 1rem;
        text-align: left;
    }
}