body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1d29 0%, #2d3748 25%, #1a202c 50%, #2c3e50 75%, #1a1d29 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    text-align: center;
    overflow-x: hidden; /* Only hide horizontal overflow */
    padding-top: 50px; /* Account for fixed header */
    padding-bottom: 35px; /* Account for fixed footer */
    box-sizing: border-box;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Timer running animations */
@keyframes moneyPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 30px rgba(46, 204, 113, 0.3);
    }
    50% {
        transform: scale(1.02);
        text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7), 0 0 50px rgba(46, 204, 113, 0.5);
    }
}

@keyframes backgroundIntensify {
    0% {
        background: linear-gradient(135deg, #1a1d29 0%, #2d3748 25%, #1a202c 50%, #2c3e50 75%, #1a1d29 100%);
    }
    50% {
        background: linear-gradient(135deg, #1e2139 0%, #34405e 25%, #1e2740 50%, #2f4454 75%, #1e2139 100%);
    }
    100% {
        background: linear-gradient(135deg, #1a1d29 0%, #2d3748 25%, #1a202c 50%, #2c3e50 75%, #1a1d29 100%);
    }
}

@keyframes dollarFloat1 {
    0% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translate(15px, -20px) rotate(5deg);
        opacity: 0.7;
    }
    50% {
        transform: translate(-10px, -35px) rotate(-3deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(25px, -15px) rotate(8deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.4;
    }
}

@keyframes dollarFloat2 {
    0% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.3;
    }
    33% {
        transform: translate(-20px, 30px) rotate(-7deg);
        opacity: 0.6;
    }
    66% {
        transform: translate(30px, 10px) rotate(4deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.3;
    }
}

@keyframes dollarFloat3 {
    0% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.5;
    }
    20% {
        transform: translate(10px, -25px) rotate(6deg);
        opacity: 0.4;
    }
    40% {
        transform: translate(-25px, -10px) rotate(-5deg);
        opacity: 0.7;
    }
    60% {
        transform: translate(20px, 15px) rotate(3deg);
        opacity: 0.3;
    }
    80% {
        transform: translate(-15px, 25px) rotate(-8deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.5;
    }
}/* Timer running state classes */
.timer-running {
    animation: backgroundIntensify 8s ease infinite !important;
}

.cost-counting {
    animation: moneyPulse 2s ease infinite;
}

.floating-emoji {
    position: fixed;
    pointer-events: none;
    font-size: 3rem;
    z-index: -1;
    user-select: none;
}

.floating-emoji-1 {
    top: 20%;
    left: 10%;
    color: rgba(255, 215, 0, 0.4);
    animation: dollarFloat1 6s ease infinite;
}

.floating-emoji-2 {
    top: 70%;
    right: 15%;
    color: rgba(46, 204, 113, 0.4);
    animation: dollarFloat2 8s ease infinite 1s;
}

.floating-emoji-3 {
    top: 40%;
    right: 25%;
    color: rgba(52, 152, 219, 0.4);
    animation: dollarFloat3 7s ease infinite 2s;
}

.floating-emoji-4 {
    bottom: 30%;
    left: 20%;
    color: rgba(155, 89, 182, 0.4);
    animation: dollarFloat1 9s ease infinite 3s;
}

.floating-emoji-5 {
    top: 15%;
    right: 40%;
    color: rgba(231, 76, 60, 0.4);
    animation: dollarFloat2 5s ease infinite 1.5s;
}

.floating-emoji-6 {
    bottom: 20%;
    right: 35%;
    color: rgba(241, 196, 15, 0.4);
    animation: dollarFloat3 6.5s ease infinite 0.5s;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    max-width: 100%;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: linear-gradient(90deg, #1a1d29 0%, #2c3e50 50%, #1a1d29 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    height: 50px;
    z-index: 1000;
    box-sizing: border-box;
    padding: 0 10px;
}
.header-left {
    display: flex;
    align-items: center;
}
.header button {
    font-size: 1rem;
    padding: 8px 15px;
}
.title {
    font-size: 1.5rem;
    flex-grow: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ffffff, #e8e8e8, #ffffff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShimmer 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.help-text {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    flex-shrink: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.help-text h2 {
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.help-text p {
    color: #e8e8e8;
    opacity: 0.9;
}
#configPanel {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 10px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.input-people {
    width: 55px;
}

.input-salary {
    width: 70px;
}

#configPanel input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 5px 8px;
    margin-left: 8px;
    transition: all 0.3s ease;
}

#configPanel input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

#configPanel label {
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
#cost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size:22vw;
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}
button {
    font-size: 1.5rem;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.start {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.start:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.stop {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.stop:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.config {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.config:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
}


#startTimeLabel, #costPerSecondLabel {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 30px;
    background: linear-gradient(90deg, #1a1d29 0%, #2c3e50 50%, #1a1d29 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-sizing: border-box;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.footer p {
    margin: 0 0 10px 0;
}

.tech-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tech-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tech-link:hover {
    color: #22d3ee;
}

.tech-link img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tech-link:hover img {
    transform: scale(1.1);
}

.tech-link span {
    font-size: 0.875rem;
    font-weight: 500;
}


.hidden {
    display: none;
}

#lblCurrentCost {
    margin-top: 62px;
    font-size: 16px;
}

.footer-link {
    color: white;
}

.footer-link-bold {
    color: white;
    font-weight: bold;
}

.version-label {
    opacity: 0.5;
    font-size: 0.8em;
}

.link-green {
    color: #4CAF50;
    font-weight: bold;
}

.about-creator {
    margin-bottom: 20px;
}

.about-creator-inner {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2) 0%, rgba(142, 68, 173, 0.2) 100%);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
}

/* About page styles */
.about-page {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.content {
    max-width: 1280px;
    margin: 0 auto;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
}

.content h1, .content h2 { color: #fff; margin-top: 0.25rem; }
.content p, .content li { color: #ccc; margin-bottom: 2px; }

.back-link {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin: 10px;
}

.back-link:hover {
    text-decoration: none;
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.about-page .header .title {
    position: static !important;
    transform: none !important;
    flex-grow: 0 !important;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin: 8px 0;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid h3 {
    margin: 4px 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.3) 0%, rgba(52, 73, 94, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.emoji-header {
    font-size: 2rem;
}

.step-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 8px 0;
}

.step-container h3 {
    margin: 4px 0;
}

.step-item {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(46, 204, 113, 0.2) 100%);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 10px;
    padding: 5px;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.2) 100%);
    border-left: 4px solid #3498db;
    padding: 5px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
}

.cta-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(46, 204, 113, 0.15) 100%);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px 0;
}

/* About page responsive breakpoints */
@media (min-width: 1280px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1280px;
    }
}

@media (min-width: 900px) and (max-width: 1279px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Styles for mobile devices (width less than 768px) */
@media screen and (max-width: 767px) {
    body {
        padding-bottom: 60px; /* More space for mobile footer */
    }

    .controls {
        margin-bottom: 20px;
        position: relative;
    }

    .footer {
        min-height: 50px; /* Taller footer on mobile */
        font-size: 0.8rem;
        padding: 10px;
        line-height: 1.3;
    }

    .header button {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .title {
        font-size: 1.3rem;
    }

    #cost {
        font-size: 18vw; /* Slightly smaller on mobile */
    }

    /* About page mobile styles */
    .content {
        padding: 10px !important;
        max-width: 100% !important;
    }

    .content h1, .content h2 {
        font-size: 1.4rem;
    }

    .content p, .content li {
        font-size: 0.95rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step-container {
        flex-direction: column;
        align-items: center;
    }

    .step-item {
        max-width: 100%;
        min-width: auto;
    }

    .emoji-header {
        font-size: 1.5rem;
    }
}