/* Style */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

/* Header & Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    transition: opacity 0.2s ease, transform 0.1s ease;
    user-select: none;
    margin: 0;
}

header h1:hover {
    opacity: 0.8;
    color: #1abc9c;
}

header h1:active {
    transform: scale(0.95);
}

nav button {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

nav button:hover {
    background-color: #1abc9c;
}

nav button:active {
    transform: translateY(2px);
}

/* Main Content */
main {
    max-width: 1100px; /* Increased to allow topic grids to spread out */
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* LPC Content width */
#module-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Transitions & Utility */
.hidden {
    display: none !important;
}

.lpc-stage {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid #1abc9c;
    background-color: #fafafa;
}

/* Action Buttons */
button {
    background-color: #1abc9c;
    color: #000000;
    border: none;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #16a085;
}

/* Home Screen */
.welcome-container {
    text-align: center;
    padding: 1rem 0 2rem 0;
}

.welcome-title {
    color: #2c3e50;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: #555;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Login layout */
#login-screen .start-btn {
    background-color: #1abc9c !important;
    color: white !important;              
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

#login-screen .start-btn:hover {
    background-color: #16a085 !important; /* Hover effect */
}

.module-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 280px;
    padding: 3rem 1.5rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Card Colors */
.card-finance { background-color: #5acb4c; }
.card-career { background-color: #d1463e; }
.card-digital { background-color: #40b4c7; }

/* (Finance, Career, Digital - Module Style) */
#finance-menu, #career-menu, #digital-menu {
    padding: 10px;
}

.menu-header {
    text-align: center;
    margin-bottom: 40px;
}

.finance-text { color: #27ae60; }
.career-text { color: #d1463e; }
.digital-text { color: #40b4c7; }

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.topic-card {
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 250px;
}

/* Sub-Menu gradients */
#finance-menu .topic-card { background: linear-gradient(135deg, #2ecc71, #27ae60); }
#career-menu .topic-card { background: linear-gradient(135deg, #e74c3c, #c0392b); }
#digital-menu .topic-card { background: linear-gradient(135deg, #3498db, #2980b9); }

.topic-card:hover {
    transform: scale(1.03);
}

.topic-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Button Styles */
.start-btn, .lesson-btn {
    background-color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: auto; /* Aligns buttons to the bottom */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Colors matching the module themes */
.card-finance .start-btn, #finance-menu .lesson-btn { color: #27ae60; }
.card-career .start-btn, #career-menu .lesson-btn { color: #d1463e; }
.card-digital .start-btn, #digital-menu .lesson-btn { color: #40b4c7; }

.start-btn:active, .lesson-btn:active {
    transform: scale(0.95);
}

/* Content Blocks*/
.finance-hero-container,
.career-hero-container, 
.digital-hero-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px 0;
}

.hero-img {
    width: 200px;
    height: auto;
    border-radius: 4px;
}

.hero-text-content {
    flex: 1;
}

.info-block {
    margin-bottom: 20px;
}

.info-block h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.fundamentals-list {
    margin: 10px 0;
    padding-left: 20px;
}

.fundamentals-list li {
    margin-bottom: 5px;
}

/* Border Colors */
.finance-hero-container { border-left: 10px solid #2e7d32; }
.finance-hero-container h3 { color: #2e7d32; }

.career-hero-container { border-left: 10px solid #d1463e; }
.career-hero-container h3 { color: #d1463e; }

.digital-hero-container { border-left: 10px solid #40b4c7; }
.digital-hero-container h3 { color: #40b4c7; }

/* Image on top of text for small screens */
@media (max-width: 600px) {
    .finance-hero-container,
    .career-hero-container,
    .digital-hero-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

/* Mini Game */
/* Market Roulette */
.tool-card.finance-theme {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: 400px;
    margin: auto;
    font-family: sans-serif;
}

.age-control {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.age-control input {
    width: 60px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

#current-age-display {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #2c3e50;
}

.roulette-visual-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 20px;
}

#wheel-animation {
    font-size: 3rem;
    transition: transform 0.5s ease-out;
}

.portfolio-badge {
    text-align: right;
}

#portfolio-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.investment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.risk-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s;
}

.risk-btn:active { transform: scale(0.95); }

.risk-btn.low { background: #e8f5e9; color: #2e7d32; }
.risk-btn.med { background: #fff3e0; color: #ef6c00; }
.risk-btn.high { background: #ffebee; color: #c62828; }

.risk-btn:disabled {
    background: #f5f5f5 !important;
    color: #bdbdbd !important;
    cursor: not-allowed;
    transform: none;
}

.feedback-area {
    min-height: 50px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.hidden { display: none; }

.reset-link {
    display: block;
    width: 100%;
    background: #34495e;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* App permission game */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #eef2f3; 
    display: flex; 
    justify-content: center; 
    padding: 40px; 
}

.main-title {
    font-size: 1.4em;
    color: #007bff; 
    border-bottom: 2px solid #eef2f3;
    padding-bottom: 15px;
    margin-bottom: 20px;
    line-height: 1.2;
}
    
.game-container { 
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    width: 100%;
    max-width: 400px; 
    text-align: center; 
}

h2 { 
    color: #333; 
    margin-top: 0; 
}

#app-description { 
    font-style: italic; 
    color: #666; 
    font-size: 0.9em; 
    margin-bottom: 20px;
}

.permission-card { 
    background: #f8f9fa; 
    padding: 20px; 
    border-radius: 10px; 
    border: 2px solid #e9ecef; 
}

.icon { 
    font-size: 40px; 
    margin-bottom: 10px; 
}

#permission-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #495057;
    margin-bottom: 20px;
}

.btn-group, .action-group { 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
}

button { 
    padding: 12px 25px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 1em;
    transition: filter 0.2s;
}

button:hover {
    filter: brightness(0.9);
}

.allow-btn { background: #28a745; color: white; }
.deny-btn { background: #dc3545; color: white; }

.action-btn {
    width: 100%;
    margin-top: 10px;
}

.next-btn { background: #007bff; color: white; }
.reset-btn { background: #6c757d; color: white; }
    
/* Buttons matching the start lesson style */
.investment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.risk-btn {
    border: none;
    border-radius: 20px;
    padding: 12px 5px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    color: white;
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}

.risk-btn.low { background: #2ecc71; }
.risk-btn.med { background: #f39c12; }
.risk-btn.high { background: #e74c3c; }

.risk-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.feedback-area {
    margin-top: 15px;
    min-height: 40px;
    text-align: center;
    font-weight: 500;
}

.reset-link {
    display: block;
    margin: 10px auto 0;
    background: none;
    border: none;
    color: #7f8c8d;
    text-decoration: underline;
    cursor: pointer;
}

.fundamentals-list {
    text-align: left;
    display: inline-block;
    }
}
.tools-section {
    margin-top: 40px;
    padding: 20px;
    background: #f4f7f6;
    border-radius: 12px;
}

.tool-container {
    display: flex;
    flex-wrap: wrap; /* Cards jump to the next row if they don't fit */
    gap: 20px;
    justify-content: center;
}

.tool-card {
    flex: 1;
    min-width: 280px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px; 
    border-top: 5px solid #2e7d32; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.tool-card h4 {
    color: #2e7d32;
    margin-top: 0;
}
    
.tool-card input {
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.results-display {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e9; /* Light green */
    border-radius: 6px;
    font-weight: bold;
    color: #1b5e20;
}

.tool-desc {
    font-size: 0.9rem;
    color: #333 !important;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Resume Interactive Styles */
.resume-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #ccc;
    text-align: left;
    margin-top: 10px;
    font-size: 0.95rem;
}

.red-flag {
    color: #c0392b;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px dotted #c0392b;
    transition: 0.3s;
}

.red-flag:hover {
    background-color: #fadbd8;
}

.red-flag.found {
    background-color: #c0392b;
    color: white;
    text-decoration: line-through;
}

/* Career Buttons */
.scenario-btn {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    color: #2c3e50;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
}

.scenario-btn:hover {
    border-color: #2980b9;
    background-color: #ebf5fb;
}

/* Helper Class */
.hidden {
    display: none !important;
}
