@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
}

.label {
    color: #0f0;
}
.back-btn {
    position: relative;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background-color: #000000;
    border: solid 2px #0f0;
    border-image: linear-gradient(to right, #0f0, #0f0, rgb(0, 46, 0)) 1;
    border-left: 4px solid #0f0;
    color: #0f0;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #0f0;
    color: #000000;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #000000;
    padding: 20px 10px;
    gap: 20px;
}

.calculator-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
    border-style: solid;
    border-width: 4px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1rem;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: -3rem;
    margin-left: 2rem;
    color: #0f0;
}
.title {
    margin-top: auto;
}

.calculator {
    margin-bottom: 2rem;
}

.input-method-container {
    margin-bottom: 1rem;
    color: #0f0;
}

.input-method-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: #0f0;
}

.input-method-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #0f0;
}

.input-method-options input[type="radio"] {
    accent-color: #0f0;
}

.input-container {
    display: flex;
    margin-bottom: 1rem;
    align-items: stretch;
}

#time-input {
    flex: 1;
    padding: 1rem;
    font-size: 1.5em;
    background: #000;
    color: #0f0;
    border: 2px solid;
    border-left: 5px solid;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
    border-radius: 5px 0 0 5px;
    transition: border-color 0.3s;
    min-height: 4rem;
    height: auto;
    overflow-y: hidden;
    word-wrap: break-word;
    white-space: pre-wrap;
}

#time-input:focus {
    outline: none;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
}

#calculate-btn {
    width: 70px;
    background-color:rgb(0, 0, 0);
    color: #0f0;
    font-size: 1.5rem;
    border: solid 2.5px #0f0;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
    border-left: 4px solid #0f0;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: stretch;
}

#calculate-btn:hover {
    background-color: #0f0;
    color: #000;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
}

.result-container {
    background: #000;
    color: rgb(0, 0, 0);
    padding: 1rem;
    border-radius: 5px;
    border: 2.5px solid;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
    border-left: 4px solid #0f0;
}

#result, #result-2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0f0;
}

#explanation, #explanation-2 {
    font-size: 0.9rem;
    color: #0f0;
}

.instructions {
    background: #000000;
    border-color: #0f0;
    border: 3px solid;
    border-image: linear-gradient(to right, #0f0, rgb(0, 46, 0)) 1;
    border-left: 4px solid #0f0;
    padding: 1rem;
    border-radius: 5px;
}

.instructions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.toggle-btn {
    background: none;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 3px;
}

.toggle-btn:hover {
    background-color: #0f0;
    color: #000000;
}

.instructions h3 {
    margin-bottom: 0.5rem;
    color: #0f0
}

.instructions ul {
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.3rem;
    color: #0f0;
}

h1:hover, #result:hover, .instructions h3:hover {
    animation: glitch .7s infinite alternate;
    text-shadow: 
        0.1em 0 0 rgba(0, 255, 0, 0.7),
        -0.05em -0.015em 0 rgba(255, 0, 0, 0.7),
        0.015em 0.05em 0 rgba(0, 0, 255, 0.7);
}

@keyframes glitch {
    0%, 100% { 
        transform: translate(0);
        text-shadow: 
            0.1em 0 0 rgba(0, 255, 0, 0.7),
            -0.1em -0.025em 0 rgba(255, 0, 0, 0.7);
    }
    25% { 
        transform: translate(-0.025em, 0.01em);
        text-shadow: 
            -0.1em -0.025em 0 rgba(0, 255, 0, 0.7),
            0.025em 0.025em 0 rgba(255, 0, 0, 0.7);
    }
    50% { 
        transform: translate(0.01em, -0.01em);
        text-shadow: 
            0.025em 0.1em 0 rgba(0, 255, 0, 0.7),
            0.1em 0 0 rgba(255, 0, 0, 0.7);
    }
    75% { 
        transform: translate(-0.01em, 0.01em);
        text-shadow: 
            -0.025em 0 0 rgba(0, 255, 0, 0.7),
            -0.025em -0.025em 0 rgba(255, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    #time-input, #time-input-2 {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    #calculate-btn, #calculate-btn-2 {
        width: 45px;
        font-size: 1.2rem;
    }
    
    #result, #result-2 {
        font-size: 1.2rem;
    }
    
    .instructions {
        font-size: 0.9rem;
    }
}