/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Malgun Gothic', 'Microsoft YaHei', 'Hiragino Sans', 'Noto Sans Thai', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#languageSelect {
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 25px;
    background: white;
    color: #667eea;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#languageSelect:hover {
    background: #667eea;
    color: white;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.header-nav {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.home-icon {
    font-size: 16px;
}

.main-header {
    text-align: center;
}

#mainTitle {
    font-size: 2.8em;
    color: #2c3e50;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    line-height: 1.2;
}

#subtitle {
    font-size: 1.3em;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Curiosity Section */
.curiosity-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
}

.curiosity-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.curiosity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.curiosity-card:hover::before {
    left: 100%;
}

.curiosity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

.curiosity-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
    animation: bounce 2s infinite;
}

.curiosity-card p {
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* Start Button */
.start-button-container {
    margin: 40px 0 20px 0;
}

.start-quiz-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    justify-content: center;
}

.start-quiz-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #5a6fd8, #6a42a0);
}

.start-quiz-button:active {
    transform: translateY(-1px);
}

.button-animation {
    font-size: 1.2em;
    animation: pulse 1.5s infinite;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Question Counter */
.question-counter {
    text-align: center;
    font-size: 1.1em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Question Container */
.question-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

#questionText {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Answer Options */
.answer-options {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-option {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: left;
}

.answer-option:hover {
    background: #e3f2fd;
    border-color: #667eea;
    transform: translateY(-2px);
}

.answer-option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Buttons */
.next-button, .restart-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.next-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.next-button:not(:disabled):hover, .restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Result Section */
.result-section {
    text-align: center;
}

#resultTitle {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-team {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid #667eea;
    position: relative;
}

.result-team::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.team-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 4px solid white;
}

.result-team h3 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: bold;
}

.result-team p {
    font-size: 1.2em;
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 20px;
}

.match-percentage {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.3em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Detailed Analysis */
.detailed-analysis {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#analysisTitle {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analysis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.analysis-card:hover::before {
    left: 100%;
}

.analysis-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.analysis-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.analysis-card h4 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: bold;
}

.analysis-card p {
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 1em;
}

/* Player Recommendations */
.player-recommendations {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#playerRecommendTitle {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.player-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.player-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.player-position {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Similar and Rival Teams */
.similar-teams, .rival-teams {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#similarTeamsTitle, #rivalTeamsTitle {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.similar-teams-grid, .rival-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.team-mini-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.team-mini-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.team-mini-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 50%;
}

.team-mini-name {
    font-size: 0.9em;
    color: #2c3e50;
    font-weight: bold;
}

.rival-explanation {
    text-align: center;
    margin-bottom: 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* Fun Facts */
.fun-facts {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#funFactsTitle {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.fact-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
}

.fact-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.fact-card p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Chart Legend */
.chart-explanation {
    margin-top: 20px;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #2c3e50;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.attack { background: #ff6b6b; }
.legend-color.defense { background: #4ecdc4; }
.legend-color.tradition { background: #45b7d1; }
.legend-color.passion { background: #f9ca24; }
.legend-color.tactics { background: #6c5ce7; }
.legend-color.entertainment { background: #a29bfe; }

/* Chart Container */
.chart-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#chartTitle {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

#radarChart {
    max-width: 100%;
    height: auto;
}

/* Team Stats */
.team-stats {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#statsTitle {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: bold;
    color: #2c3e50;
}

.stat-value {
    color: #667eea;
    font-weight: bold;
}

/* Share Section */
.share-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#shareTitle {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook {
    background: #4267b2;
    color: white;
}

.share-btn.copy {
    background: #95a5a6;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ad Container */
.ad-container {
    margin: 30px 0;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    #mainTitle {
        font-size: 2.2em;
    }
    
    #subtitle {
        font-size: 1.1em;
    }
    
    .curiosity-section {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .curiosity-card {
        padding: 20px 15px;
    }
    
    .curiosity-card p {
        font-size: 1em;
    }
    
    .start-quiz-button {
        padding: 15px 30px;
        font-size: 1.1em;
        min-width: 200px;
    }
    
    .home-button {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    #questionText {
        font-size: 1.2em;
    }
    
    .answer-option {
        padding: 12px 15px;
        font-size: 1em;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
    }
}

/* Team Info Section */
.team-info-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.team-info-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}

.team-info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.info-card h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* Why This Team Section */
.why-this-team {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #e3f0ff 0%, #f0f8ff 100%);
    border-radius: 15px;
}

.why-this-team h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.reason-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.reason-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.reason-card h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.reason-card p {
    color: #666;
    line-height: 1.6;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
