* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.screen {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #444;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.description {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 40px;
    line-height: 1.6;
}

.test-selection {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.test-category {
    text-align: center;
}

.test-category h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 600;
}

.test-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.4);
}

.btn-skip {
    background: #e0e0e0;
    color: #666;
}

.btn-skip:hover {
    background: #d0d0d0;
}

.btn-spi {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
}

.btn-spi:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 154, 158, 0.4);
}

.btn-tamatebako {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.btn-tamatebako:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 237, 234, 0.4);
}

.btn-tgweb {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.btn-tgweb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(252, 182, 159, 0.4);
}

.btn-gab {
    background: linear-gradient(135deg, #a8caba 0%, #5d4e75 100%);
    color: white;
}

.btn-gab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 202, 186, 0.4);
}

.btn-cab {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
}

.btn-cab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.test-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.test-desc {
    font-size: 0.9em;
    opacity: 0.8;
    line-height: 1.2;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.question-counter {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.question-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 30px;
}

.question-image {
    margin-bottom: 30px;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto 30px;
}

.pattern-cell {
    aspect-ratio: 1;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
}

.pattern-cell.filled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pattern-cell.question-mark {
    background: #fff;
    border: 3px dashed #667eea;
    color: #667eea;
    font-weight: bold;
}

.answer-options {
    display: grid;
    gap: 15px;
}

.answer-option {
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: left;
}

.answer-option:hover {
    background: #e8f0fe;
    border-color: #667eea;
    transform: translateX(5px);
}

.answer-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 450px;
    margin: 0 auto;
}

.answer-grid .answer-option {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.navigation {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
}

.score-display {
    text-align: center;
    margin-bottom: 30px;
}

.score-label {
    font-size: 1.5em;
    color: #666;
    margin-bottom: 10px;
}

.score-value {
    font-size: 4em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-description {
    text-align: center;
    font-size: 1.2em;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
}

.score-chart {
    text-align: center;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Personality Analysis Styles */
.personality-analysis {
    display: grid;
    gap: 20px;
}

.trait-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.trait-icon {
    font-size: 2.5em;
    line-height: 1;
}

.trait-content {
    flex: 1;
}

.trait-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.trait-description {
    color: #666;
    line-height: 1.5;
}

/* Skills Breakdown Styles */
.skills-breakdown {
    display: grid;
    gap: 20px;
}

.skill-item {
    display: grid;
    grid-template-columns: 150px 1fr 60px;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
}

.skill-name {
    font-weight: 600;
    color: #333;
}

.skill-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 2s ease;
    width: 0%;
}

.skill-score {
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

/* Comparison Chart Styles */
.comparison-chart {
    text-align: center;
    padding: 20px;
}

/* Recommendations Styles */
.recommendations {
    display: grid;
    gap: 20px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 10px;
    border-left: 4px solid #f093fb;
}

.recommendation-icon {
    font-size: 2.5em;
    line-height: 1;
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.recommendation-description {
    color: #666;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .screen {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .btn {
        width: 100%;
        min-width: 200px;
    }
    
    .test-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .answer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }

    .skill-score {
        text-align: left;
    }

    .trait-item,
    .recommendation-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .trait-icon,
    .recommendation-icon {
        align-self: center;
    }
}