/* Home page specific styles */

/* Background overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/pikts-fonas.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
}

/* Main content */
.main {
    min-height: 100vh;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-family: 'Inter', 'Segoe UI', 'DejaVu Sans', Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #FFF;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.7), -1px -1px 0px rgba(0,0,0,0.7), 1px -1px 0px rgba(0,0,0,0.7), -1px 1px 0px rgba(0,0,0,0.7);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-btn svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.social-btn.youtube:hover svg {
    fill: #ff0000;
}

/* Tools grid */
.section {
    padding: 2rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-white);
}

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

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(59, 130, 246, 0.15);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Accent cards */
.tool-card.accent {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.tool-card.accent h3,
.tool-card.accent p {
    color: var(--text-white);
}

.tool-card.accent p {
    opacity: 0.9;
}

.tool-card.accent::before {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
}

/* Interactive sections */
.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.interactive-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.interactive-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

/* Chess boards */
#myBoard, #practiceBoard {
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.puzzle-info {
    text-align: center;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.puzzle-rating {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.puzzle-theme {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

#status, #practiceStatus {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#status.correct, #practiceStatus.correct {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

#status.wrong, #practiceStatus.wrong {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

#status.info, #practiceStatus.info {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.practice-desc {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.practice-desc a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.practice-desc a:hover {
    text-decoration: underline;
}

/* External tools */
.external-tools {
    margin-top: 4rem;
}

.external-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.external-card {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
}

.external-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.external-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.external-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.footer-youtube {
    margin-bottom: 1rem;
}

.youtube-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #FF0000;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.youtube-link:hover {
    background: #CC0000;
    transform: scale(1.1);
}

.youtube-icon {
    width: 28px;
    height: 28px;
    fill: white;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--text-white);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--text-white);
}

@media (max-width: 480px) {
    .footer-separator {
        display: none;
    }

    .footer-copyright {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 2rem;
    }

    .hero-logo {
        width: 150px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 1.5rem 1rem 3rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .interactive-grid {
        grid-template-columns: 1fr;
    }

    .interactive-card {
        padding: 1.5rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-social {
        gap: 0.75rem;
    }

    .social-btn {
        width: 46px;
        height: 46px;
    }
}
