:root {
    --primary: rgb(237, 226, 54);
    --primary-dark: rgb(217, 206, 34);
    --primary-light: rgba(237, 226, 54, 0.1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, rgb(255, 230, 0) 100%);
    --dark-bg: #121212;
    --dark-card: #1e1e1e;
    --dark-text: #ffffff;
    --light-bg: #f8f9fa;
    --light-card: #ffffff;
    --light-text: #333333;
    --gray: #6c757d;
    --success: #28a745;
    --error: #dc3545;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    overflow-x: hidden;
    
    --bg-color: var(--light-bg);
    --card-bg: var(--light-card);
    --text-color: var(--light-text);
    --shadow: var(--shadow);
    --border-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    
    --bg-color: var(--dark-bg);
    --card-bg: var(--dark-card);
    --text-color: var(--dark-text);
    --shadow: var(--shadow-dark);
    --border-color: rgba(255, 255, 255, 0.1);
}

body.auto-theme {
    background-color: var(--light-bg);
    color: var(--light-text);
    
    --bg-color: var(--light-bg);
    --card-bg: var(--light-card);
    --text-color: var(--light-text);
    --shadow: var(--shadow);
    --border-color: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    body.auto-theme {
        background-color: var(--dark-bg);
        color: var(--dark-text);
        
        --bg-color: var(--dark-bg);
        --card-bg: var(--dark-card);
        --text-color: var(--dark-text);
        --shadow: var(--shadow-dark);
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
    align-items: center;
    justify-content: center;
    flex-direction: column;

}

header {
    background-color: var(--card-bg);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-color);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
    box-shadow: 0 4px 10px rgba(237, 226, 54, 0.3);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}


.theme-toggle {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
    font-size: 1.2rem;
    position: relative;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.theme-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--card-bg);
}

.theme-auto .theme-indicator {
    background: linear-gradient(45deg, var(--primary) 50%, #888 50%);
}

.desktop-nav {
    display: flex;
    align-items: center;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

.desktop-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 30px;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a:hover, .desktop-nav a.active {
    background: var(--primary-light);
    color: var(--text-color);
}

.desktop-nav a i {
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--primary-light);
    padding: 8px 15px;
    border-radius: 30px;
    transition: var(--transition);
    margin-left: 15px;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 226, 54, 0.2);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    font-size: 1.1rem;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav ul {
    display: flex;
    list-style: none;
    justify-content: space-around;
}

.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 20px;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    text-align: center;
}

.mobile-nav a:hover, .mobile-nav a.active {
    background: var(--primary-light);
    color: #000;
}

.mobile-nav a i {
    font-size: 1.2rem;
}

main {
    padding: 3rem 0;
    min-height: calc(100vh - 140px);
    background-color: var(--bg-color);
    align-items: center;
    justify-content: center;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    width: 100%;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
    color: var(--text-color);
}
.form-group a {
    margin-bottom: 1.8rem;
    position: relative;
    color: var(--text-color);
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i:not(.password-toggle) {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 1;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
    background: transparent;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    font-family: 'Raleway', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(237, 226, 54, 0.2);
}

.btn {
    background: var(--gradient);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(237, 226, 54, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(237, 226, 54, 0.4);
}

.btn i {
    font-size: 1.1rem;
}

footer {
    background-color: var(--card-bg);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    color: var(--text-color);
    justify-content: space-between;
    align-items: center;
}

.footer-content a {
    color: var(--text-color);
    
}

.alert-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--error);
    color: white;
    padding: 12px 0;
    text-align: center;
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

.alert-bar.show {
    transform: translateY(0);
}

.alert-bar.success {
    background: var(--success);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.alert-bar i {
    font-size: 1.1rem;
}

.alert-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.alert-close:hover {
    opacity: 1;
}

body.alert-shown header {
    margin-top: 48px;
}

body.alert-shown main {
    padding-top: calc(3rem + 48px);
}

@media (max-width: 968px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    main {
        padding-bottom: 80px;
    }
    
    footer {
        margin-bottom: 80px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .mobile-nav a {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    
    main {
        padding-bottom: 70px;
    }
    
    footer {
        margin-bottom: 70px;
    }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(237, 226, 54, 0.4);
}

.btn i {
    font-size: 1.1rem;
}

.password-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.password-requirements h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-color);
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.requirement i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
    transition: var(--transition);
}

.requirement.valid {
    color: var(--success);
}

.requirement.invalid {
    color: var(--error);
}

.requirement-text {
    flex: 1;
}

.devices-list {
    margin-bottom: 2rem;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    background-color: var(--bg-color);
}

.device-item:hover {
    border-color: var(--primary);
}

.device-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.device-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.device-details h3 {
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.device-details p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.device-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--bg-color);
    transform: translateY(-3px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 7px 20px rgba(255, 107, 107, 0.4);
}

.btn {
    background: var(--gradient);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(237, 226, 54, 0.3);
}
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.login-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.login-card h2 {
    margin-bottom: 0.5rem;
}

.login-card p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.9rem;
}
.qr-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;        
}

.qr-code {
    width: 200px;
    height: 200px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border: 1px solid var(--border-color);
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.qr-placeholder i {
    font-size: 3rem;
    color: var(--primary);
}

.secret-key {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin: 1.5rem 0;
    word-break: break-all;
    text-align: center;
}

.instructions {
    text-align: left;
    margin: 2rem 0;
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-width: 600px;
}

.instructions ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.instructions a {
   color: var(--text-color);
}

.instructions li {
    margin-bottom: 0.8rem;
}
.qrcard {
    align-content: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    flex-wrap:wrap;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    max-width: 1200px;
    width: 100%;
    text-align: center;
    
    
}

.messagebox-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.messagebox-card {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.messagebox-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.messagebox-card h2 {
    margin-bottom: 0.5rem;
}

.messagebox-card p {
    margin-bottom: 2rem;
    opacity: 0.8;
}


.text-danger {
    width: 300px;
    height: 200px;
    padding: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-color);
    
}
.text-success {
    width: 300px;
    height: 200px;
    padding: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-color);
    
}