body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    font-family: Arial, sans-serif;
    overflow: hidden;
    position: relative;
}

.menu-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1;
    min-width: 300px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-title {
    font-family: 'Righteous', cursive;
    font-size: 5rem;
    color: #ffffff;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-button {
    font-family: 'Poppins', sans-serif;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    color: #1e3c72;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Add these new background detail styles */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -150px;
    left: -150px;
}

body::after {
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
    animation: shapeFloat 15s infinite linear;
}

.shape:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    border: 4px solid #fff;
    transform: rotate(45deg);
}

.shape:nth-child(2) {
    top: 60%;
    right: 15%;
    width: 150px;
    height: 150px;
    border: 4px solid #fff;
    border-radius: 50%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    bottom: 10%;
    left: 30%;
    width: 80px;
    height: 80px;
    border: 4px solid #fff;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: -7s;
}

@keyframes float {
    0% {
        transform: rotate(0deg) translate(50px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translate(50px) rotate(-360deg);
    }
}

@keyframes shapeFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* Add these new modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    margin: 15% auto;
    padding: 2rem;
    width: 80%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #1e3c72;
    cursor: pointer;
}

.close-button:hover {
    color: #2a5298;
}

.modal-content p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #1e3c72;
    margin: 1rem 0;
    text-align: center;
}

.luck-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: rgba(30, 60, 114, 0.05);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

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

/* Add difficulty menu styles */
.difficulty-menu {
    display: none;
    opacity: 0;
    transform: translate(-50%, 150%) scale(0.8);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.difficulty-title {
    font-family: 'Righteous', cursive;
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.difficulty-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    margin: 0.5rem 0;
    width: 100%;
    text-align: center;
}

.difficulty-name {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.difficulty-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animation classes */
.fade-out {
    opacity: 0 !important;
    transform: translate(-50%, -150%) scale(0.8) !important;
    pointer-events: none;
}

.fade-in {
    display: block !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

/* Add animation for initial state */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 150%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Add new styles */
.countdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.countdown-number {
    font-family: 'Righteous', cursive;
    font-size: 8rem;
    color: white;
    animation: countdownPulse 1s infinite;
}

.game-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    box-sizing: border-box;
}

.game-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 1.2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.companies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    max-width: 1200px;
    margin: 0 auto;
}

.company-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.buy-button {
    padding: 0.5rem 1rem;
    background: white;
    border: none;
    border-radius: 5px;
    color: #1e3c72;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.buy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes countdownPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Add slide animations */
.slide-out {
    opacity: 0 !important;
    transform: translate(-150%, -50%) !important;
    pointer-events: none;
}

@keyframes slideOut {
    to {
        transform: translate(-150%, -50%);
        opacity: 0;
    }
}

/* Add results screen styles */
.results-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1000;
}

.results-screen.show {
    opacity: 1;
}

.results-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    width: 80%;
    max-width: 600px;
}

.results-screen h2 {
    font-family: 'Righteous', cursive;
    color: white;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stock-results {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.percentage.increase {
    color: #4CAF50;
}

.percentage.decrease {
    color: #f44336;
}

.final-money {
    text-align: center;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 2rem 0;
}

.final-money h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

#finalBalance {
    font-size: 2rem;
    font-weight: bold;
    color: #4CAF50;
}

/* Fix for buy button functionality */
.buy-button {
    padding: 0.5rem 1rem;
    background: white;
    border: none;
    border-radius: 5px;
    color: #1e3c72;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.buy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-details {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.shares-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.money-change {
    font-weight: bold;
}

.money-change.increase {
    color: #4CAF50;
}

.money-change.decrease {
    color: #f44336;
}

.difficulty-button-container {
    position: relative;
    width: 100%;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.restart-button {
    flex-shrink: 0;
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.restart-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.total-money {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    backdrop-filter: blur(5px);
} 