/* 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, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    min-height: 100vh;
    color: #ecf0f1;
}

.main-container {
    display: flex;
    min-height: 100vh;
    gap: 2rem;
    padding: 2rem;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.right-section {
    width: 350px;
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(236, 240, 241, 0.1);
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: #ecf0f1;
    font-weight: 300;
}

.help-card {
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 1.2rem;
    margin-top: 2rem;
    border: 1px solid rgba(236, 240, 241, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-card:hover {
    background: rgba(44, 62, 80, 0.9);
    border-color: rgba(236, 240, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.help-card h3 {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 500;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    text-align: center;
    color: #bdc3c7;
}

.ranking-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #ecf0f1;
    font-weight: 400;
}

.ranking-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(52, 73, 94, 0.6);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(236, 240, 241, 0.05);
}

.ranking-row:hover {
    transform: translateX(5px);
    background: rgba(52, 73, 94, 0.8);
    border-color: rgba(236, 240, 241, 0.2);
}

.ranking-row.current {
    background: rgba(149, 165, 166, 0.3);
    border: 2px solid #95a5a6;
    box-shadow: 0 0 20px rgba(149, 165, 166, 0.3);
}

.rank-number {
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 30px;
    color: #ecf0f1;
}

.rank-number.gold {
    color: #f39c12;
}

.rank-number.silver {
    color: #bdc3c7;
}

.rank-number.bronze {
    color: #e67e22;
}

.animal-name-rank {
    flex: 1;
    margin-left: 1rem;
    font-weight: 500;
    color: #ecf0f1;
}

.animal-score-rank {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ecf0f1;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.animal-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    height: 220px;
}

.animal-card {
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem;
    width: 250px;
    height: 160px;
    border: 1px solid rgba(236, 240, 241, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.animal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background: rgba(44, 62, 80, 0.9);
    border-color: rgba(236, 240, 241, 0.2);
}

.animal-name {
    font-size: 1.5rem;
    color: #ecf0f1;
    text-align: center;
    word-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
    padding: 0 0.5rem;
    font-weight: 400;
}

.score-display {
    font-size: 1.1rem;
    font-weight: 600;
    height: 3rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
    width: 100%;
    padding: 0.5rem;
    background: rgba(44, 62, 80, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ecf0f1;
    border: 1px solid rgba(236, 240, 241, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.score-display.show {
    opacity: 1;
}

.score-change {
    font-size: 1rem;
    margin-top: 0.5rem;
}

.score-change.positive {
    color: #27ae60;
}

.score-change.negative {
    color: #e74c3c;
}

.vs-divider {
    font-size: 2rem;
    font-weight: 300;
    color: #bdc3c7;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
}

/* Score change balloon animation */
.score-balloon {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 2;
  font-size: 1.6rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.3);
  transition: opacity 0.2s, transform 0.2s;
  animation: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.score-balloon.positive {
  color: #27ae60;
}
.score-balloon.negative {
  color: #e74c3c;
}

.score-balloon.pop {
  opacity: 1;
  animation: balloon-pop 1s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes balloon-pop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  20% {
    opacity: 1;
    transform: scale(1.2);
  }
  60% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .right-section {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .comparison-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
    }
    
    .vs-divider {
        font-size: 1.5rem;
        height: auto;
        margin: 0.5rem 0;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .animal-card {
        width: 220px;
        height: 140px;
        padding: 1rem;
    }
    
    .animal-name {
        font-size: 1.2rem;
    }
    
    .ranking-title {
        font-size: 1.3rem;
    }
    
    .help-card {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .help-card h3 {
        font-size: 1.1rem;
    }
}

/* FAQ Modal Styles */
.faq-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.faq-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(44, 62, 80, 0.95);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(236, 240, 241, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(236, 240, 241, 0.1);
    position: sticky;
    top: 0;
    background: rgba(44, 62, 80, 0.95);
    border-radius: 20px 20px 0 0;
}

.faq-header h2 {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
}

.close-button {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(236, 240, 241, 0.1);
    color: #ecf0f1;
}

.faq-body {
    padding: 2rem;
}

.faq-item {
    margin-bottom: 2rem;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.faq-item p {
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .faq-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .faq-header {
        padding: 1rem 1.5rem;
    }
    
    .faq-header h2 {
        font-size: 1.3rem;
    }
    
    .faq-body {
        padding: 1.5rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    .faq-item p {
        font-size: 0.95rem;
    }
} 