:root {
    --primary-color: #6a3de8;
    --secondary-color: #38b2ac;
    --accent-color: #f6ad55;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --gradient-start: #6a3de8;
    --gradient-end: #38b2ac;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    border-radius: 0 0 30% 30% / 30px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 25px rgba(106, 61, 232, 0.2);
}

.dashboard-hero {
    padding: 4rem 2rem;
    border-radius: 0 0 10% 10% / 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 3rem;
    margin-right: 1rem;
    animation: float 3s ease-in-out infinite;
}

.site-title {
    font-weight: 800;
    font-size: 3.5rem;
    margin: 0;
    background: linear-gradient(90deg, #ffffff, #e6e6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Main Card */
.main-card {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

/* Features Section */
.features {
    margin: 3rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
    background-color: rgba(106, 61, 232, 0.05);
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        background-color: rgba(106, 61, 232, 0.1);
    }

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Steps */
.step-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

    .step-container:before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50px;
        width: 2px;
        background: var(--primary-color);
        transform: translateX(-50%);
    }

.step {
    display: flex;
    margin-bottom: 2.5rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 2rem;
    box-shadow: 0 5px 15px rgba(106, 61, 232, 0.3);
    z-index: 2;
}

.step-content {
    flex-grow: 1;
}

/* CTA Section */
.cta-section {
    padding: 2rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(106, 61, 232, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(106, 61, 232, 0.4);
    }

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(106, 61, 232, 0.2);
    }

/* Terminal/Example Card */
.example-card {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.terminal {
    background-color: var(--dark-color);
    border-radius: 12px;
    overflow: hidden;
}

.terminal-header {
    background-color: #1a202c;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

    .terminal-dot.red {
        background-color: #fc8181;
    }

    .terminal-dot.yellow {
        background-color: #f6e05e;
    }

    .terminal-dot.green {
        background-color: #68d391;
    }

.terminal-title {
    font-family: monospace;
    color: #a0aec0;
    margin-left: 10px;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 1.5rem;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
}

.mystery-title {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.hint-label {
    color: var(--secondary-color);
    font-weight: bold;
}

.code-editor {
    background-color: #2d3748;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
}

    .code-editor code {
        color: #63b3ed;
    }

.query-result {
    color: #68d391;
    font-style: italic;
    margin-top: 1rem;
}

/* Animation */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Auth Pages */
.auth-card {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.auth-icon {
    font-size: 3rem;
    display: block;
    margin: 0 auto 1rem;
    animation: float 3s ease-in-out infinite;
}

/* Form Styles */
.form-floating > .form-control {
    padding: 1rem 1rem;
}

    .form-floating > .form-control:focus ~ label,
    .form-floating > .form-control:not(:placeholder-shown) ~ label {
        transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
    }

.form-floating > label {
    padding: 1rem 1rem;
}

/* Dashboard Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.card-header {
    border-bottom: 0;
}

.stats-row {
    padding: 1rem 0;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

.progress {
    background-color: #e9ecef;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: rgba(106, 61, 232, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

    .achievement-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

.achievement-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    margin: 0;
    font-size: 1.1rem;
}

.achievement-desc {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.achievement-date {
    color: #a0aec0;
    font-size: 0.8rem;
}

.featured-mystery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mystery-difficulty {
    margin-bottom: 0.5rem;
}

.mystery-title {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.mystery-desc {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.rank {
    font-weight: 700;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #edf2f7;
}

.list-group-item.active {
    background-color: rgba(106, 61, 232, 0.1);
    border-color: rgba(106, 61, 232, 0.2);
    color: var(--dark-color);
}

/* Mystery page specific styles */
.mystery-hero {
    background: linear-gradient(135deg, #2c3e50, #1a2a3a);
    min-height: 200px;
}

.mystery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.mystery-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
}

    .mystery-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

.difficulty-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.difficulty-beginner {
    background-color: #28a745;
}

.difficulty-intermediate {
    background-color: #fd7e14;
}

.difficulty-advanced {
    background-color: #dc3545;
}

.difficulty-expert {
    background-color: #6f42c1;
}

.mystery-icon {
    font-size: 36px;
    margin-bottom: 15px;
    text-align: center;
}

.mystery-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.mystery-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.mystery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.solved-count {
    font-size: 12px;
    color: #666;
}

.skills-required {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.skill-tag {
    background-color: #f1f1f1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}

.mystery-filters {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.ranking-card {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .ranking-card h4 {
        color: #333;
        margin-bottom: 15px;
    }

    .ranking-card p {
        margin-bottom: 20px;
        flex-grow: 1;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .step-container:before {
        left: 25px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 1rem;
    }
}
