/* Modern String Art Generator Styles */

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 0; /* Remove padding to eliminate gap */
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important; /* Different color scheme */
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 100px 0; /* Add top padding to account for fixed navbar */
    position: relative;
    overflow: hidden;
    margin-top: 0; /* Ensure no margin */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,0 500,500"/></svg>');
    background-size: 200px 200px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Generator Section */
.generator-section {
    background-color: #f8f9fa;
}

.generator-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.generator-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.generator-card .card-body {
    padding: 2rem;
}

.status-container .alert {
    border-radius: 10px;
    border: none;
}

.instructions-container .alert {
    border-radius: 10px;
    border: none;
}

.settings-container h5 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.form-group label {
    color: #555;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-upload {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.upload-help {
    margin-top: 1rem;
}

/* Results Section */
.results-section {
    padding: 2rem 0;
}

.result-card {
    margin-bottom: 2rem;
}

.result-card .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.result-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.result-card .card-body {
    padding: 2rem;
}

.result-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-canvas-medium {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-canvas-large {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.action-buttons .btn,
.step-controls .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover,
.step-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* How to Use Section */
.how-to-use-section {
    background-color: #f8f9fa;
}

.section-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

.step-card {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.8rem;
}

.step-card h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-card p {
    color: #666;
    margin-bottom: 0;
}

.materials-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.materials-list {
    list-style: none;
    padding: 0;
}

.materials-list li {
    padding: 0.5rem 0;
    color: #555;
}

.materials-list .fas {
    color: #667eea;
}

/* FAQ Section */
.faq-section {
    background-color: white;
}

.accordion .card {
    border: none;
    border-radius: 10px !important;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.accordion .card-header {
    background-color: #f8f9fa;
    border: none;
    border-radius: 10px !important;
}

.accordion .btn-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 1rem;
    width: 100%;
    text-align: left;
}

.accordion .btn-link:hover {
    color: #667eea;
    text-decoration: none;
}

.accordion .card-body {
    color: #666;
    line-height: 1.7;
}

/* Footer */
.footer {
    background-color: #2c3e50 !important;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #667eea !important;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .generator-card .card-body {
        padding: 1.5rem;
    }
    
    .step-card {
        margin-bottom: 2rem;
    }
    
    .result-canvas-medium {
        max-width: 100%;
    }
    
    .result-canvas-large {
        max-width: 100%;
    }
    
    .result-image {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 140px 0 60px 0;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .generator-card .card-body {
        padding: 1rem;
    }
    
    .materials-card {
        padding: 1.5rem;
    }
    
    .result-card .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .result-card .card-header .btn {
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Download notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner for better UX */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Legacy class support for JavaScript */
.center {
    margin: auto;
    width: 75%;
    border: 3px solid lightgray;
    padding: 10px;
}

.centerBorderless {
    margin: auto;
    width: 75%;
    padding: 10px;
}

.centerImage{
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 500px;
    max-width: 100%;
}

.centerCanvasMedium {
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 500px;
    max-width: 100%;
}

.centerCanvasLarge {
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 800px;
    max-width: 100%;
}

textarea {
    display: block;
    margin-left: auto;
    margin-right: auto;
}