* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    min-height: 100vh;
    padding: 20px 0;
    margin: 0;
}

.container-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

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

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

.header p {
    font-size: 1.1em;
    opacity: 0.95;
}

/* Card Styles */
.editor-card,
.controls-card {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editor */
#vega-spec {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: 2px solid #dbeafe;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f0f9ff;
}

#vega-spec:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Visualization Areas */
#vega-vis {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    margin-top: 25px;
    background: #f0f9ff;
    border-radius: 10px;
    border: 2px dashed #93c5fd;
}

#vega-vis.error {
    color: #dc2626;
    font-weight: 600;
}

#vega-vis svg {
    max-width: 100%;
    height: auto;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.styled-select {
    padding: 12px 15px;
    border: 2px solid #dbeafe;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #3b82f6 50%, #2563eb 50%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-primary-gradient:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.presentation-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.presentation-button:hover {
    background: linear-gradient(135deg, #3b82f6 50%, #2563eb 50%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Examples Panel */
.examples-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.examples-panel.show {
    display: block;
}

.loading-message,
.error-message {
    text-align: center;
    padding: 20px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 15px;
}

.loading-message {
    color: #2563eb;
    background: #dbeafe;
}

.error-message {
    color: #dc2626;
    background: #fee2e2;
}

.example-category {
    font-size: 1.1em;
    font-weight: 700;
    color: #3b82f6;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dbeafe;
}

.example-item {
    padding: 12px 15px;
    margin: 8px 0;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #333;
}

.example-item:hover {
    background: #dbeafe;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Presentation Mode */
.presentation-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.presentation-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.presentation-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#presentation-container {
    width: 90%;
    height: 90%;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: auto;
}

.close-presentation {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.close-presentation:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navigation-links {
    display: flex;
    justify-content: flex-start;
    margin-top: 30px;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.9;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

footer a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }

    .editor-card,
    .controls-card,
    .examples-panel {
        padding: 20px;
    }

    #vega-vis {
        min-height: 250px;
        padding: 20px;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .controls > * {
        width: 100%;
    }

    #vega-spec {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    .editor-card,
    .controls-card,
    .examples-panel {
        padding: 15px;
        border-radius: 10px;
    }

    #vega-spec {
        min-height: 150px;
        font-size: 0.85em;
    }

    .controls {
        gap: 8px;
    }
}
