/* Modern CSS Reset and Base Styles */

* {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}



html {

    height: 100%;

    font-size: 16px;

}



body {

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    height: 100%;

    margin: 0;

    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);

    color: #333;

    line-height: 1.6;

}



/* Main Container */

.vertical-align-div {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 100vh;

    padding: 20px;

    width: 100%;

}



/* Panel Styling */

.panel {

    background: rgba(0, 0, 0, 0.95);

    backdrop-filter: blur(10px);

    border-radius: 20px;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);

    padding: 40px;

    text-align: center;

    max-width: 400px;

    width: 100%;

    transition: transform 0.3s ease, box-shadow 0.3s ease;

    border: 2px solid rgba(255, 255, 255, 0.1);

}



.panel:hover {

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);

}



/* Logo Styling */

#main-logo {

    max-height: 120px;

    max-width: 250px;

    width: auto;

    height: auto;

    object-fit: contain;

    margin-bottom: 30px;

    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));

    transition: transform 0.3s ease;

    display: block;

    margin-left: auto;

    margin-right: auto;

}



/* Typography */

p {

    font-size: 1.1rem;

    color: #ffffff;

    font-weight: 400;

}



/* Form Styling */

form {

    display: flex;

    flex-direction: column;

    gap: 20px;

}



.form-group {

    display: flex;

    flex-direction: column;

    gap: 8px;

}



label {

    font-weight: 600;

    color: #ffffff;

    font-size: 0.9rem;

    text-align: left;

    margin-bottom: 5px;

}



input[type="number"] {

    width: 100%;

    padding: 15px 20px;

    font-size: 1.1rem;

    border: 2px solid #e1e5e9;

    border-radius: 12px;

    background: #fff;

    transition: all 0.3s ease;

    text-align: center;

    letter-spacing: 2px;

    font-weight: 600;

}



input[type="number"]:focus {

    outline: none;

    border-color: #dc2626;

    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);

}



input[type="number"]::placeholder {

    color: #999;

    letter-spacing: normal;

    font-weight: 400;

}



/* Button Styling */

.button {

    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);

    color: white;

    border: none;

    padding: 15px 30px;

    font-size: 1.1rem;

    font-weight: 600;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s ease;

    text-transform: uppercase;

    letter-spacing: 1px;

    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);

}



.button:hover {

    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);

    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);

}



.button:active {

    transform: translateY(0);

}



/* Error Message Styling */

.error-message {

    background: #fef2f2;

    color: #dc2626;

    padding: 15px;

    border-radius: 8px;

    border-left: 4px solid #dc2626;

    font-size: 0.9rem;

    margin-bottom: 20px;

    animation: slideIn 0.3s ease;

}



@keyframes slideIn {

    from {

        opacity: 0;

        transform: translateY(-10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* TOTP Code Display Styling */

.code-container {

    display: flex;

    flex-direction: column;

    gap: 25px;

}



.code-section {

    background: rgba(255, 255, 255, 0.05);

    border-radius: 15px;

    padding: 20px;

    border: 1px solid rgba(255, 255, 255, 0.1);

    transition: all 0.3s ease;

}



.code-section:hover {

    background: rgba(255, 255, 255, 0.08);

}



.code-section h2 {

    color: #ffffff;

    font-size: 1.2rem;

    font-weight: 600;

    margin-bottom: 15px;

    text-transform: uppercase;

    letter-spacing: 1px;

}



.code-display {

    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);

    color: white;

    font-size: 2rem;

    font-weight: 700;

    padding: 20px;

    border-radius: 12px;

    margin-bottom: 10px;

    letter-spacing: 3px;

    text-align: center;

    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);

    transition: all 0.3s ease;

    border: 2px solid rgba(255, 255, 255, 0.1);

    position: relative;

}



.code-display:hover {

    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);

}



.code-info {

    color: #cccccc;

    font-size: 0.9rem;

    margin: 0;

    font-weight: 400;

}



.refresh-section {

    margin-top: 10px;

}



.refresh-btn {

    margin-bottom: 10px;

    width: 100%;

}



.refresh-info {

    color: #999999;

    font-size: 0.8rem;

    margin: 0;

    font-style: italic;

}



/* Responsive Design */

@media (max-width: 480px) {

    .panel {

        padding: 30px 20px;

        margin: 10px;

    }

    

    #main-logo {

        height: 100px;

    }

    

    p {

        font-size: 1rem;

    }

    

    input[type="number"] {

        padding: 12px 16px;

        font-size: 1rem;

    }

    

    .button {

        padding: 12px 24px;

        font-size: 1rem;

    }

    

    .code-display {

        font-size: 1.5rem;

        padding: 15px;

        letter-spacing: 2px;

    }

    

    .code-section h2 {

        font-size: 1.1rem;

    }

}



/* Loading State */

.button:disabled {

    opacity: 0.7;

    cursor: not-allowed;

    transform: none;

}



/* Focus States for Accessibility */

.button:focus {

    outline: none;

    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);

}



/* Smooth Scrolling */

html {

    scroll-behavior: smooth;

}



/* Toast Notification */

.toast {

    position: fixed;

    top: 20px;

    right: 20px;

    background: linear-gradient(135deg, #059669 0%, #047857 100%);

    color: white;

    padding: 15px 20px;

    border-radius: 8px;

    font-weight: 600;

    font-size: 0.9rem;

    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);

    transform: translateX(400px);

    opacity: 0;

    transition: all 0.3s ease;

    z-index: 1000;

    max-width: 300px;

    text-align: center;

}



.toast.show {

    transform: translateX(0);

    opacity: 1;

}



/* Error toast variant */

.toast.error {

    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);

    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);

}



/* Copy Icon Styling */

.copy-icon {

    position: absolute;

    top: 10px;

    right: 10px;

    font-size: 1.2rem;

    opacity: 0.7;

    transition: opacity 0.3s ease;

    cursor: pointer;

}



.code-display:hover .copy-icon {

    opacity: 1;

}