* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
	font-family: 'Comfortaa';  
	src: url('/Comfortaa-Light.ttf') format('truetype');  
}

body {
    font-family: 'Comfortaa', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.container {
    width: 90%;
    max-width: 600px;
    text-align: center;
    position: relative;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    letter-spacing: 2px;
}

.start-button {
    font-family: 'Comfortaa', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    border: none;
    border-radius: 50px;
    padding: 25px 60px;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
}

.start-button:active {
    transform: translateY(0);
}

.timer-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.current-text {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.countdown {
    font-size: 6rem;
    font-weight: 200;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: Comfortaa, 'Courier New', monospace;
}

.countdown.warning {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}

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

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 4px;
    transition: width 1s linear;
    width: 0%;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.control-btn.stop {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.control-btn.stop:hover {
    background: rgba(255, 107, 107, 0.5);
}

.final-text {
    font-size: 4rem;
    margin-bottom: 3rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: celebration 2s ease-in-out infinite alternate;
}

@keyframes celebration {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); color: #ffd700; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; margin-bottom: 2rem; }
    .start-button { padding: 20px 40px; font-size: 1.5rem; }
    .current-text { font-size: 2rem; min-height: 60px; }
    .countdown { font-size: 4rem; }
    .final-text { font-size: 3rem; }
    .timer-info { font-size: 1rem; }
}

/* Tooltip rendszer */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%) translateY(10px) scale(0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.tooltip.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px) scale(0.8);
}

/* Tooltip animációk különböző irányokból */
.tooltip.slide-up {
    animation: slideUpTooltip 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.tooltip.slide-down {
    animation: slideDownTooltip 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes slideUpTooltip {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes slideDownTooltip {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
}

/* Speciális tooltip pozíciók a control gombokhoz */
.control-btn .tooltip {
    bottom: 120%;
}

/* Responsive tooltip */
@media (max-width: 768px) {
    .tooltip {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
}