body {
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.page-layout {
    display: flex;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 2rem;
}

.container {
    flex: 1;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    min-width: 0; /* Prevents flex item from overflowing */
    max-width: 1000px;
    margin: 0 auto;
}

.ad-container {
    background-color: #f1f3f5;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 2rem;
    width: 160px;
    height: 600px;
    flex-shrink: 0;
}

.ad-left, .ad-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quote-generator {
    text-align: center;
    margin: 3rem 0;
}

.quote-box {
    position: relative;
    background-color: #f8f9fa;
    padding: 2.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
}

.copy-btn.copied {
    background: #4CAF50;
    color: white;
}

.copy-btn i {
    font-size: 1.2rem;
}

.quote-display {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.quote-author {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

#generateBtn {
    background-color: #764ba2;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#generateBtn:hover {
    background-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.customization-panel {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.customize-toggle {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.customize-toggle:hover {
    background-color: #edf2f7;
    border-color: #764ba2;
}

.customize-toggle i {
    font-size: 1.1rem;
}

.controls {
    display: none;
    margin-top: 2rem;
}

.controls.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.style-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 150px;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:hover {
    border-color: #764ba2;
}

select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.2);
}

label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #2c3e50;
}

.intro-section, .trending-quotes, .usage-guide {
    background-color: #fff;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.intro-section h2, .trending-quotes h2, .usage-guide h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.intro-section p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.trending-quote {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
}

.trending-quote blockquote {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.quote-explanation {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.usage-guide {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    color: #444;
}

.usage-guide ul {
    list-style-type: none;
    padding: 0;
}

.usage-guide li {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #444;
    line-height: 1.6;
}

.usage-guide li strong {
    color: #764ba2;
    display: block;
    margin-bottom: 0.5rem;
}

.sidebar-ad {
    margin: 2rem 0;
    width: 100%;
}

.sidebar-ad .ad-container {
    min-height: 250px;
}

.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: #666;
    border-top: 1px solid #eee;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    width: 100%;
    margin-top: auto;
    position: relative;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
}

.footer p {
    margin: 0;
}

.site-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.tagline {
    color: #666;
    font-size: 1.2rem;
    margin-top: -1rem;
}

h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

h3 {
    color: #2c3e50;
    margin: 1rem 0;
    font-size: 1.2rem;
}

@media (max-width: 1200px) {
    .page-layout {
        gap: 1rem;
    }
    
    .ad-container {
        width: 120px;
    }
}

@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
    }
    
    .ad-left, .ad-right {
        display: none;
    }
    
    .container {
        margin: 0 auto;
        width: 100%;
        max-width: 800px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .style-group {
        min-width: 100%;
    }
    
    .quote-box {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .intro-section, .trending-quotes, .usage-guide {
        padding: 1.5rem;
    }
    
    .trending-quote {
        padding: 1rem;
    }
}