/* ===== AUTHENTICATION STYLES ===== */

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-button {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border: 1px solid #0ff;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.auth-button:hover::before {
    left: 100%;
}

.profile-button {
    border-color: #0ff;
    color: #0ff;
}

.logout-button {
    border-color: #ff3377;
    color: #ff3377;
}

.logout-form {
    margin: 0;
    padding: 0;
}

/* Modal Styles */
.cyber-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cyber-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    width: 90%;
    max-width: 450px;
    background: rgba(10, 15, 20, 0);
    border: 1px solid #0ff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: modal-appear 0.3s ease forwards;
}

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

.auth-modal-header {
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
}

.auth-tab {
    background: transparent;
    color: #ccc;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Share Tech Mono', monospace;
}

.auth-tab.active {
    color: #0ff;
    border-bottom-color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.auth-tab:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.modal-header h3 {
    margin: 0;
    color: #0ff;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
}

.close-modal {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: #0ff;
    background-color: rgba(0, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Loading indicator */
.auth-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 10, 30, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cyber-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    border: 3px solid transparent;
    border-top: 3px solid #0ff;
    border-right: 3px solid #0ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styles */
.auth-form-container {
    padding: 1.5rem;
}

.terminal-effect {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.terminal-header {
    background: #0a0a0a;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.terminal-title {
    font-family: 'Share Tech Mono', monospace;
    color: #0ff;
    font-size: 0.8rem;
}

.terminal-controls {
    display: flex;
    gap: 5px;
}

.terminal-controls span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-controls span:nth-child(1) {
    background: #ff5f56;
}

.terminal-controls span:nth-child(2) {
    background: #ffbd2e;
}

.terminal-controls span:nth-child(3) {
    background: #27c93f;
}

.terminal-body {
    padding: 1rem;
    font-family: 'Share Tech Mono', monospace;
}

.terminal-body .line {
    color: #0f0;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0ff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    border-color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.cyber-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #0ff;
    position: relative;
    cursor: pointer;
    margin-right: 8px;
}

.cyber-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0ff;
    font-size: 12px;
}

.checkbox-label {
    color: #ccc;
    cursor: pointer;
}

.forgot-password {
    color: #ccc;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password:hover {
    color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.cyber-text {
    position: relative;
    display: inline-block;
}

.cyber-text::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: #0ff;
    transition: width 0.3s ease;
}

.forgot-password:hover .cyber-text::before {
    width: 100%;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.form-switch {
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
}

.form-switch a {
    color: #0ff;
    text-decoration: none;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.form-switch a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: #0ff;
    transition: width 0.3s ease;
}

.form-switch a:hover {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.form-switch a:hover::after {
    width: 100%;
}

.form-check {
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.form-check-input {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: rgba(0, 30, 60, 0.5);
    border: 1px solid #0ff;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
}

.form-check-input:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0ff;
    font-size: 12px;
}

.form-check-label {
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
}

.auth-submit-button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #0ff;
    color: #0ff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-button:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.auth-submit-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: button-shine 3s linear infinite;
}

@keyframes button-shine {
    0% {
        top: -50%;
        left: -50%;
    }
    100% {
        top: 150%;
        left: 150%;
    }
}

.auth-alternate {
    margin-top: 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.switch-auth-form {
    background: none;
    border: none;
    color: #0ff;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.switch-auth-form:hover {
    text-decoration: underline;
    color: #fff;
    text-shadow: 0 0 5px #0ff;
}

.auth-message {
    padding: 1rem;
    margin: 0 1.5rem 1.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
    text-align: center;
}

.auth-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff5555;
}

.auth-message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-button {
        width: 100%;
        text-align: center;
    }
    
    .auth-modal-content {
        width: 95%;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .forgot-password {
        margin-left: 0;
    }
}

@media (max-height: 950px) {
    .terminal-effect {
        display: none;   
    }   
}

@media (max-height:815px){
    .auth-form-container{
        padding-top:0px;
    }

    .auth-form-container .cyber-input{
        padding : 0;
        border : none;
    }
}
