/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* Welcome Screen */
.welcome-content {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.welcome-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #667eea;
}

.welcome-content h1 i {
    margin-right: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.continue-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
}

.continue-section p {
    margin-bottom: 20px;
    color: #7f8c8d;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 5px;
}

.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.3);
}

.btn-secondary {
    background: #34495e;
    color: white;
}

.btn-secondary:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-ghost {
    background: transparent;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
}

.btn-ghost:hover {
    background: #ecf0f1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Test Screen */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-container {
    flex: 1;
    margin-right: 20px;
}

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

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

.progress-text {
    font-weight: 600;
    color: #667eea;
}

.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.question-card h2 {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #2c3e50;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
}

.option-btn:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

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

.option-btn i {
    font-size: 1.2rem;
    width: 20px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Loading Screen */
.loading-content {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.loading-spinner {
    margin-bottom: 30px;
}

.loading-spinner i {
    font-size: 4rem;
    color: #667eea;
}

.loading-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.loading-content p {
    color: #7f8c8d;
}

/* Result Screen */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.result-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.result-card {
    padding: 40px;
}

.result-type {
    text-align: center;
    padding: 40px 20px;
    margin: -40px -40px 40px -40px;
    color: white;
}

.result-type h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.result-type h2 {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* MBTI Type Colors */
.enfp { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.infp { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.enfj { background: linear-gradient(135deg, #fd79a8, #e84393); }
.infj { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.entp { background: linear-gradient(135deg, #55a3ff, #2e86de); }
.intp { background: linear-gradient(135deg, #00b894, #00a085); }
.entj { background: linear-gradient(135deg, #fdcb6e, #e17055); }
.intj { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.esfp { background: linear-gradient(135deg, #fd79a8, #fdcb6e); }
.isfp { background: linear-gradient(135deg, #81ecec, #74b9ff); }
.esfj { background: linear-gradient(135deg, #ff7675, #fd79a8); }
.isfj { background: linear-gradient(135deg, #a29bfe, #74b9ff); }
.estp { background: linear-gradient(135deg, #ffeaa7, #fab1a0); }
.istp { background: linear-gradient(135deg, #00b894, #55a3ff); }
.estj { background: linear-gradient(135deg, #e17055, #d63031); }
.istj { background: linear-gradient(135deg, #636e72, #2d3436); }

/* Share Dropdown Styles */
.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    text-align: left;
}

.share-option:hover {
    background-color: #f8f9fa;
}

.share-option i {
    width: 20px;
    text-align: center;
}

.result-summary {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.dimensions {
    margin-bottom: 40px;
}

.dimensions h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.dimension-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dimension-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dimension-label {
    width: 80px;
    font-weight: 600;
    color: #2c3e50;
}

.bar-container {
    flex: 1;
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

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

.dimension-value {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

.strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.strengths h3,
.weaknesses h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.strengths ul,
.weaknesses ul {
    list-style: none;
}

.strengths li,
.weaknesses li {
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
}

.weaknesses li {
    border-left-color: #e74c3c;
}

.career-relationships {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.career h3,
.relationships h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.career-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.career-tag {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.compatibility {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compatibility-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comp-type {
    font-weight: 600;
    color: #667eea;
}

.comp-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.detailed-description {
    margin-bottom: 40px;
}

.detailed-description h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.description-content {
    line-height: 1.8;
    color: #2c3e50;
}

.description-content p {
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .welcome-content,
    .question-card,
    .result-card {
        padding: 30px 20px;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .test-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-container {
        margin-right: 0;
        width: 100%;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .navigation .btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-type h1 {
        font-size: 3rem;
    }
    
    .strengths-weaknesses,
    .career-relationships {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .welcome-content h1 {
        font-size: 1.8rem;
    }
    
    .question-card h2 {
        font-size: 1.3rem;
    }
    
    .option-btn {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .result-type h1 {
        font-size: 2.5rem;
    }
    
    .result-type h2 {
        font-size: 1.2rem;
    }
}

/* Animation Enhancements */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.question-card.slide-right {
    animation: slideInRight 0.5s ease;
}

.question-card.slide-left {
    animation: slideInLeft 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
