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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tagline {
    opacity: 0.9;
    font-style: italic;
}

/* Navigation */
nav {
    background-color: #2d3748;
    padding: 0 30px;
    display: flex;
    gap: 5px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 15px 25px;
    display: inline-block;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    background-color: #1a202c;
    color: #fff;
}

nav a.active {
    background-color: #1a202c;
    border-bottom-color: #f5576c;
    color: #fff;
}

/* Main Content */
main {
    padding: 30px;
}

/* Welcome Section */
.welcome {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome h2 {
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Features Grid */
.features {
    margin-bottom: 30px;
}

.features h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.feature-card p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Info Box */
.info-box {
    background-color: #fef5e7;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #f39c12;
}

.info-box h3 {
    color: #e67e22;
    margin-bottom: 15px;
}

.info-box ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.info-box li {
    margin-bottom: 8px;
    color: #555;
}

.note {
    background-color: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.note code {
    background-color: #f5f5f5;
    color: #e74c3c;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Gallery Controls */
.gallery-controls {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.gallery-controls h3 {
    margin-bottom: 15px;
    color: #333;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.param-card {
    background-color: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.param-card code {
    background-color: #f5f5f5;
    color: #e74c3c;
    padding: 5px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.param-card span {
    color: #666;
    font-size: 0.9em;
}

.example-box {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.example-box p {
    color: #2e7d32;
    margin-bottom: 10px;
}

.example-link {
    display: inline-block;
    margin-right: 15px;
    color: #1976d2;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.example-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Gallery Display */
.gallery-display,
.legacy-display,
.interactive-display {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
}

.gallery-display h2,
.legacy-display h2,
.interactive-display h2 {
    color: #333;
    margin-bottom: 15px;
}

.image-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    border: 2px dashed #ddd;
}

.main-image,
.legacy-image,
.interactive-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.interactive-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.interactive-image:hover {
    transform: scale(1.02);
}

.caption {
    text-align: center;
    color: #555;
    font-size: 1.1em;
    margin-top: 10px;
}

.warning {
    color: #e74c3c;
    font-weight: 600;
    background-color: #fee;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

/* Debug Section */
.debug-section {
    background-color: #f3e5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.debug-section h3 {
    color: #7b1fa2;
    margin-bottom: 15px;
}

.debug-list {
    list-style: none;
    padding: 0;
}

.debug-list li {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}

.debug-list li:last-child {
    border-bottom: none;
}

.debug-list code {
    background-color: #f5f5f5;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Tips */
.tips {
    background-color: #e1f5fe;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.tips h3 {
    color: #0277bd;
    margin-bottom: 15px;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 10px;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 4px;
    color: #555;
}

.tips-list strong {
    color: #0277bd;
}

/* Security Info */
.security-info {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.security-info h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.security-info p {
    color: #555;
    margin-bottom: 10px;
}

.security-info ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.security-info li {
    color: #555;
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

footer p {
    color: #666;
}

.version {
    font-size: 0.85em;
    color: #999;
    margin-top: 5px;
}

/* Code styling */
code {
    font-family: 'Courier New', monospace;
    background-color: #f5f5f5;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }

    header h1 {
        font-size: 2em;
    }

    nav {
        flex-direction: column;
    }

    nav a {
        text-align: center;
    }

    .feature-grid,
    .params-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 20px;
    }
}
