#totp, #countdown {
    display: none; /* Hide initially */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #f5f5f5;
}

.container {
    background-color: #333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

h1 {
    color: #f5f5f5;
    margin-bottom: 20px;
    font-size: 2.2rem;
    font-weight: 700;
}

.input-group {
    margin-bottom: 20px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #bbb;
    font-size: 1rem;
}

input[type="text"],
select {
    padding: 14px;
    font-size: 1rem;
    width: 100%;
    border: 1px solid #555;
    border-radius: 12px;
    box-sizing: border-box;
    text-align: center;
    background-color: #444;
    color: #f5f5f5;
}

input[type="text"]:focus,
select:focus {
    border-color: #4ca1af;
    box-shadow: 0 0 0 0.3rem rgba(76, 161, 175, 0.5);
    outline: none;
}

button {
    padding: 15px 50px;
    background: linear-gradient(135deg, #4ca1af, #2c3e50);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(76, 161, 175, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    transform: scale(1.05);
}

button.loading {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    cursor: not-allowed;
}

.output {
    margin-top: 20px;
}

#totp {
    font-size: 2.7rem;
    color: #28a745;
    margin-bottom: 10px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

#countdown {
    font-size: 1.3rem;
    color: #6c757d;
}

button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    margin-left: 10px;
}

#copyBalloon {
    position: absolute;
    background-color: rgba(220, 53, 69, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 1000;
    user-select: none;
}

#qr-scanner {
    position: relative;
    width: 250px; 
    height: 250px; 
    overflow: hidden;
    border: 2px solid #4ca1af;
    border-radius: 10px;
    margin: auto;
    background: rgba(0, 0, 0, 0.5);
}

#qr-scanner video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

#advancedSection {
    display: none;
}

#secret {
    width: 100%;
    max-width: 400px;
}

#scanQrBtn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #4ca1af, #2c3e50);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(76, 161, 175, 0.3);
    margin-top: 20px;
}

#scanQrBtn:hover {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    transform: scale(1.05);
}

#scanQrBtn:active {
    transform: scale(0.98);
}

#showAdvancedOptions {
    margin-top: 30px;
}

#showAdvancedOptions input {
    margin-right: 10px;
}

#advancedSection {
    margin-top: 20px;
}

#scanQrBtn, #generateBtn, #showAdvancedOptions {
    margin-bottom: 20px;
}

/* Red Reset Button */
#resetBtn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #e74c3c, #c0392b); /* Red gradient */
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    margin-top: 20px;
}

#resetBtn:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c); /* Darker red gradient on hover */
    transform: scale(1.05);
}

#resetBtn:active {
    transform: scale(0.98);
}
