:root {
    --green: #00ff88;
    --dark-green: #007944;
    --black: #1a1a1a;
    --white: #ffffff;
    --light-bg: #f5f5f5;
    --dark-bg: #121212;
    --text-dark: #333333;
    --text-light: #f0f0f0;
    --header-footer-bg: rgba(0, 40, 20, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
    background: linear-gradient(to bottom, var(--black), var(--dark-green));
    color: var(--text-light);
}

/* Header Styles */
header {
    background-color: var(--header-footer-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--green);
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: var(--green);
    color: var(--black);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--green);
    cursor: pointer;
    background: none;
    border: none;
}

/* Ad Space */
.ad-space {
    background: rgba(0, 0, 0, 0.3);
    color: var(--green);
    text-align: center;
    padding: 15px;
    margin: 10px auto;
    border-radius: 8px;
    max-width: 728px;
    border: 1px dashed var(--green);
}

.ad-space.top-ad {
    margin-top: 20px;
}

.ad-space.bottom-ad {
    margin-bottom: 20px;
}

/* Main Content */
main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.clock-icon {
    width: 30px;
    height: 30px;
    border: 2px solid var(--green);
    border-radius: 50%;
    position: relative;
}

.clock-hand-hour, .clock-hand-minute {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%);
    transform-origin: bottom;
    background: var(--green);
}

.clock-hand-hour {
    width: 3px;
    height: 8px;
    animation: rotate 12s linear infinite;
}

.clock-hand-minute {
    width: 2px;
    height: 12px;
    animation: rotate 2s linear infinite;
}

.main-container {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 4px solid var(--green);
    margin: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.count-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: bold;
    color: var(--green);
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    padding: 10px;
    min-width: 120px;
}

.count-display:focus {
    outline: 2px solid var(--green);
    border-radius: 10px;
}

.stats-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-box {
    width: 120px;
    height: 100px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
    padding: 10px;
}

.stat-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--green);
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    outline: none;
}

.stat-box div:first-child {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--green);
}

.stat-box small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.increment-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--green);
    border: none;
    font-size: 3rem;
    color: var(--black);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    margin: 1rem;
    font-weight: bold;
}

.increment-btn:active {
    transform: scale(0.95);
}

.controls {
    display: flex;
    gap: 1rem;
    margin: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid var(--green);
    color: var(--text-light);
}

.control-btn:hover {
    background: rgba(0, 255, 136, 0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

#startTimer.active {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff5555;
}

/* Content Area */
.content-area {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    margin: 40px auto;
    max-width: 800px;
    border: 1px solid var(--green);
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.content-area h2 {
    color: var(--green);
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--green);
    padding-bottom: 10px;
}

.content-area h3 {
    color: var(--green);
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

.content-area p {
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.content-area ul, .content-area ol {
    margin: 15px 0 20px 30px;
}

.content-area li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.content-area strong {
    color: var(--green);
}

.note-box {
    background: rgba(0, 255, 136, 0.1);
    border-left: 4px solid var(--green);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

/* Footer Styles */
footer {
    background-color: var(--header-footer-bg);
    padding: 50px 0 20px;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--green);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--green);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--green);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--green);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    pointer-events: none;
    animation: particle 1s linear forwards;
    z-index: 1;
}

@keyframes particle {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--green);
    pointer-events: none;
    animation: confetti 3s linear forwards;
    z-index: 3;
}

@keyframes confetti {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) rotate(360deg); opacity: 0; }
}

.celebration {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    animation: celebration 2s ease-out forwards;
    z-index: 1;
}

@keyframes celebration {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    100% { box-shadow: 0 0 0 200px rgba(0, 255, 136, 0); }
}

/* Responsive Design */
@media (max-width: 900px) {
    nav ul {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--header-footer-bg);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .count-display {
        font-size: 4rem;
    }
    
    .increment-btn {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .content-area {
        padding: 20px;
        margin: 30px 15px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .main-container {
        width: 250px;
        height: 250px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .ad-space {
        width: 90%;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .stat-box {
        width: 100px;
        height: 90px;
    }
}

@media (max-width: 400px) {
    .header-container {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .main-container {
        width: 220px;
        height: 220px;
    }
    
    .count-display {
        font-size: 3.5rem;
    }
    
    .stat-box {
        width: 80px;
        height: 80px;
    }
    
    .stat-box div:first-child {
        font-size: 1.5rem;
    }
    
    .controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}