body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4eb8d0 0%, #66b050 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: white;
    position: relative;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 400px;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.calculate-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    min-width: 150px;
}

.calculate-btn.resync-btn {
    background: linear-gradient(45deg, #4eb8d0, #3a9ab2);
}

.calculate-btn.restart-btn {
    background: linear-gradient(45deg, #ffa500, #ff8c00);
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.calculate-btn.resync-btn:hover {
    box-shadow: 0 6px 20px rgba(78, 184, 208, 0.4);
}

.calculate-btn.restart-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.calculate-btn:active {
    transform: translateY(-1px);
}

.calculate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.calculate-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.result {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: auto;
}

.result.show {
    background: rgba(204, 46, 46, 0.2);
    border-color: rgba(204, 46, 46, 0.4);
}

.result-text {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-time {
    font-size: 1.3rem;
    font-weight: 700;
    color: #cc2e2e;
    margin-top: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.credits {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    letter-spacing: 0.5px;
    z-index: 1000;
}

.credits a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.credits a:hover {
    color: #ffffff;
}

.credits .separator {
    margin: 0 8px;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .calculator {
        margin: 1rem;
        padding: 2rem 1.5rem;
        width: calc(100% - 2rem);
    }
    
    .header {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .credits {
        padding: 10px 15px;
        font-size: 0.7rem;
    }

    .credits .separator {
        margin: 0 4px;
    }
}
