/* Modern CSS for Office Odyssey Web Game */

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-3: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--primary-light);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Screens */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
}

.hidden {
    display: none !important;
}

/* Start Screen */
.start-screen {
    background: var(--darker-bg);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo-container {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: var(--gradient-1);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.game-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.start-form {
    max-width: 500px;
    margin: 0 auto 60px;
    animation: fadeInUp 1s ease 0.3s both;
}

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

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

input[type="text"] {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 1.1rem;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 15px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input[type="text"]:focus + .input-icon {
    color: var(--primary-color);
}

input[type="text"]::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    width: 100%;
    font-size: 1.2rem;
    padding: 18px 40px;
}

.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--primary-color);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.6s both;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-3);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Game Screen */
.game-screen {
    background: var(--dark-bg);
}

.game-header {
    background: var(--card-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.player-info,
.level-badge,
.company-type,
.score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.level-badge {
    background: var(--gradient-1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.company-type {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-light);
}

.score-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warning-color);
}

/* Game Main */
.game-main {
    flex: 1;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.reputation {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.stat-icon.stress {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.stat-icon.happiness {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.reputation-fill {
    background: var(--success-color);
}

.stress-fill {
    background: var(--danger-color);
}

.happiness-fill {
    background: var(--warning-color);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Scenario Container */
.scenario-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scenario-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    box-shadow: var(--shadow-3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.scenario-number {
    background: var(--gradient-1);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.scenario-meta {
    display: flex;
    gap: 15px;
}

.difficulty-badge,
.category-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.difficulty-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.category-badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.scenario-title {
    font-size: 2rem;
    margin-bottom: 15px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scenario-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.scenario-situation {
    background: rgba(99, 102, 241, 0.05);
    padding: 30px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 40px;
    position: relative;
}

.scenario-situation i {
    color: var(--primary-light);
    font-size: 1.5rem;
    position: absolute;
}

.scenario-situation i:first-child {
    top: 20px;
    left: 20px;
}

.scenario-situation i:last-child {
    bottom: 20px;
    right: 20px;
}

.scenario-situation p {
    padding: 0 30px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Choices */
.choices-container {
    display: grid;
    gap: 20px;
}

.choice-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.choice-card:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
    box-shadow: var(--shadow-2);
}

.choice-card:hover::before {
    opacity: 0.1;
}

.choice-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.choice-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.choice-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.choice-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.choice-card:hover .choice-arrow {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-3);
    animation: slideUp 0.3s ease;
}

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

/* Outcome Modal */
.outcome-content {
    text-align: center;
}

.outcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.outcome-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.outcome-icon.failure {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.outcome-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.outcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.stat-changes {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
}

.stat-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.stat-change.positive {
    border-left: 3px solid var(--success-color);
}

.stat-change.negative {
    border-left: 3px solid var(--danger-color);
}

.stat-change span:first-child {
    color: var(--text-secondary);
}

.stat-change span:last-child {
    font-weight: 700;
}

.stat-change.positive span:last-child {
    color: var(--success-color);
}

.stat-change.negative span:last-child {
    color: var(--danger-color);
}

.outcome-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning-color);
    margin-bottom: 30px;
}

/* Status Modal */
.status-content {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.btn-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--danger-color);
    color: white;
}

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

.status-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Skills Section */
.skills-section {
    margin-bottom: 40px;
}

.skills-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    gap: 20px;
}

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

.skill-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-width: 120px;
}

.skill-header i {
    color: var(--primary-light);
}

.skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.skill-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* Achievements Section */
.achievements-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.achievements-list {
    display: grid;
    gap: 10px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    border-left: 3px solid var(--success-color);
}

.achievement-item i {
    color: var(--success-color);
}

.achievement-item span {
    color: var(--text-primary);
}

.no-achievements {
    color: var(--text-secondary);
    text-align: center;
    padding: 30px;
}

/* Game Over Modal */
.game-over-content {
    text-align: center;
    max-width: 700px;
}

.game-over-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--gradient-1);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.game-over-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-over-message {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.final-stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
}

.final-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.final-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.game-over-feedback {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }

    .game-subtitle {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .scenario-card {
        padding: 25px;
    }

    .scenario-title {
        font-size: 1.5rem;
    }

    .scenario-situation {
        padding: 20px;
    }

    .scenario-situation p {
        padding: 0 10px;
        font-size: 1rem;
    }

    .choice-card {
        padding: 20px;
    }

    .choice-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .choice-content p {
        font-size: 1rem;
    }

    .modal-content {
        padding: 25px;
    }

    .final-stats {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .header-center {
        width: 100%;
    }

    .company-type {
        width: 100%;
        justify-content: center;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 0.5s ease-in-out;
}
