:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: hsl(342, 97%, 40%);
    --font-family: 'Inter', sans-serif;
    --neon-purple: #a099d8;
    --neon-pink: #cf30aa;
}

/* --- Base Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 50%, rgba(226, 3, 77, 0.05) 0%, rgba(18, 18, 18, 1) 70%);
    color: var(--text-color);
    overflow: hidden;
    touch-action: manipulation;
}

/* --- Layout --- */
section.counter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100dvh;
    padding: 20px;
    gap: 2vh;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    z-index: 100;
}

/* --- Logo Animation --- */
.logo-wrapper {
    position: relative;
    padding: 3px;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.logo-wrapper::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 300%;
    height: 300%;
    background-image: conic-gradient(transparent 0%, var(--neon-purple) 10%, transparent 20%, transparent 50%, var(--neon-pink) 60%, transparent 70%);
    transform: translate(-50%, -50%) rotate(0deg);
    animation: rotateLogoBorder 3s linear infinite;
    animation-play-state: paused;
    opacity: 0;
    transition: opacity 0.3s;
}

.logo-wrapper::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: var(--bg-color);
    border-radius: 12px;
    z-index: -1;
}

.logo-wrapper:hover {
    transform: scale(1.05);
}

.logo-wrapper:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@keyframes rotateLogoBorder {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

header img.logo {
    height: clamp(40px, 7vh, 55px);
    display: block;
}

/* --- Improved Neon Input Wrapper --- */
.input-wrapper-neon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 25px;
    border-radius: 15px;
    overflow: hidden;
    scale: 0.85;
    z-index: 50;
}

.white,
.border,
.darkBorderBg,
.glow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    filter: blur(5px);
    z-index: -2;
}

.white::before,
.border::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%) rotate(0deg);
    background-image: conic-gradient(transparent, var(--neon-purple), transparent 10%, transparent 50%, var(--neon-pink), transparent 60%);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Neon Interaction */
.input-wrapper-neon:hover .white::before {
    transform: translate(-50%, -50%) rotate(-120deg);
}

.input-wrapper-neon:focus-within .white::before {
    transform: translate(-50%, -50%) rotate(440deg);
    transition: transform 4s linear;
}

#input-mask {
    position: absolute;
    inset: 2px;
    background: var(--bg-color);
    border-radius: 13px;
    z-index: -1;
}

.time-inputs {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 60;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-group label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
}

.input {
    background: #050505;
    border: 1px solid #222;
    width: 75px;
    height: 55px;
    border-radius: 10px;
    color: white;
    font-size: 1.6rem;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(226, 3, 77, 0.3);
}

/* --- Timer Display --- */
#count {
    font-weight: 800;
    /* Zoom yapınca durmaması için üst sınırı 80rem yaptık */
    font-size: clamp(3.5rem, 20vmin, 80rem); 
    color: whitesmoke;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
    text-shadow: 0 0 30px rgba(226, 3, 77, 0.2);
    margin: 10px 0;
}

/* --- 3D Button (Hızlandırıldı) --- */
.pushable {
    position: relative;
    background: transparent;
    padding: 0;
    cursor: pointer;
    width: clamp(200px, 50vmin, 300px);
    border: none;
}

.shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(4px);
    /* 600ms -> 150ms: Geri çıkış hızı */
    transition: transform 150ms cubic-bezier(.3, .7, .4, 1);
}

.edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(to left, hsl(340, 100%, 16%), hsl(340, 100%, 32%) 8%, hsl(340, 100%, 32%) 92%, hsl(340, 100%, 16%));
}

.front {
    display: block;
    position: relative;
    padding: 15px 0;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: var(--accent-color);
    transform: translateY(-6px);
    /* 600ms -> 150ms: Geri çıkış hızı */
    transition: transform 150ms cubic-bezier(.3, .7, .4, 1);
    text-align: center;
}

.pushable:hover .front {
    transform: translateY(-8px);
}

/* Tıklama anındaki anlık tepki için 34ms */
.pushable:active .front {
    transform: translateY(-2px);
    transition: transform 34ms;
}

.pushable:active .shadow {
    transform: translateY(2px);
    transition: transform 34ms;
}

.pushable:hover .shadow {
    transform: translateY(6px);
}

/* --- Reset Butonu Düzenlemesi --- */
#reset {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    opacity: 0.5;
    margin-top: 5px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    z-index: 10;
}

#reset:hover {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 82, 82, 0.4);
}

/* --- Footer & GitHub Logo Düzenlemesi --- */
.footer {
    position: fixed;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 8px 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.github-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.github-link span strong {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.4s ease;
}

.github-link:hover {
    color: #fff;
    background: rgba(226, 3, 77, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(226, 3, 77, 0.3),
        inset 0 0 10px rgba(226, 3, 77, 0.1);
    transform: translateY(-3px);
}

.github-link:hover svg {
    transform: rotate(360deg) scale(1.2);
    fill: #fff;
}

.github-link:hover span strong {
    color: var(--accent-color);
}

/* --- Responsive Landscape (Yatay Mod) --- */
@media (max-height: 550px) {
    #count {
        font-size: 5rem;
    }

    .input-wrapper-neon {
        scale: 0.6;
        margin: 0;
    }

    .pushable {
        width: 160px;
    }

    .front {
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .footer {
        display: none;
    }
}