/**
 * Chessland - Stiluri Custom
 * Design magic pentru Regatul Șahului
 */

/* ========================================
   SECȚIUNEA POVESTE INTRO
   ======================================== */
.story-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.story-intro::before {
    content: '♔ ♕ ♖ ♗ ♘ ♙';
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 100px;
    opacity: 0.1;
    pointer-events: none;
}

.story-scene {
    display: none;
    animation: fadeIn 0.5s ease;
}

.story-scene.active {
    display: block;
}

.story-scene h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.story-scene p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.story-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* ========================================
   CARUSEL PERSONAJE
   ======================================== */
.characters-carousel {
    margin: 40px 0;
    position: relative;
}

.carousel-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding: 0 20px;
}

.character-card {
    flex: 0 0 200px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.character-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.character-card.selected {
    border: 3px solid var(--chess-secondary);
    background: linear-gradient(135deg, #fff, #fff8e7);
}

.character-avatar-small {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-avatar-small img {
    width: 80%;
    height: auto;
}

.character-card h3 {
    margin: 10px 0;
    font-size: 1.2rem;
}

.character-card p {
    font-size: 0.9rem;
    color: #666;
}

/* ========================================
   STATISTICI
   ======================================== */
.stats-section {
    background: linear-gradient(135deg, var(--chess-forest), var(--chess-primary));
    border-radius: 30px;
    padding: 40px;
    color: white;
    margin: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-section {
    background: white;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 40px 0;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto 0;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 12px 30px;
}

/* ========================================
   ZONA LECȚIE
   ======================================== */
.lesson-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.lesson-board {
    background: #f9f9f9;
    border-radius: 20px;
    padding: 20px;
}

.lesson-instructions {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.objective-box {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid var(--correct-move);
}

.hint-box {
    background: linear-gradient(135deg, #fff3e0, #ffe0b5);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid var(--hint-color);
}

/* ========================================
   SISTEM STELE DETALIAT
   ======================================== */
.stars-earned {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.star-item {
    text-align: center;
}

.star-item .star-icon {
    font-size: 40px;
    color: #ccc;
}

.star-item.earned .star-icon {
    color: var(--star-gold);
}

.star-item .star-label {
    display: block;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* ========================================
   ANIMAȚII DE CONFETTI
   ======================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    top: -10px;
    opacity: 0.8;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   BUTOANE DE ACȚIUNE
   ======================================== */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-title);
}

.btn-primary {
    background: linear-gradient(135deg, var(--chess-secondary), #ff8c00);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--chess-primary), var(--chess-accent));
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800, #fb8c00);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--chess-secondary);
    color: var(--chess-secondary);
}

.btn-outline:hover {
    background: var(--chess-secondary);
    color: white;
}

/* ========================================
   MESAJ DE FEEDBACK
   ======================================== */
.feedback-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border-radius: 15px;
    padding: 15px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    border-left: 5px solid var(--correct-move);
}

.feedback-message.success {
    border-left-color: var(--correct-move);
}

.feedback-message.error {
    border-left-color: var(--wrong-move);
}

.feedback-message.info {
    border-left-color: var(--hint-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   TOOLTIP-URI
   ======================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: #333;
    color: white;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    display: none;
    z-index: 100;
}

[data-tooltip]:hover:before {
    display: block;
}

/* ========================================
   UTILITARE
   ======================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}