:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --dark-color: #202124;
    --light-color: #f8f9fa;
    --gray-color: #dadce0;
    --error-color: #ea4335;
    --success-color: #34a853;
    --font-family: 'Arial', 'Helvetica', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1rem;
    margin-top: 1rem;
}

.main-nav ul li {
    display: inline-block;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

main {
    flex: 1;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--dark-color);
}

.input-group input {
    padding: 12px;
    border: 1px solid var(--gray-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #3367d6;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: #2d9247;
}

.btn.text {
    background-color: transparent;
    color: var(--primary-color);
}

.btn.text:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.result-container {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.result-container.active {
    display: flex;
}

.code-display, .url-display, .qr-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code {
    padding: 10px;
    background-color: var(--light-color);
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
}

.url {
    padding: 10px;
    background-color: var(--light-color);
    border-radius: 4px;
    word-break: break-all;
    font-family: monospace;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#qrcode img {
    max-width: 100%;
    height: auto;
}

footer {
    text-align: center;
    padding: 1rem 0;
    color: #666;
}

.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.hidden {
    display: none;
}

/* Login specific styles */
.login-card {
    max-width: 500px;
    margin: 0 auto;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: center;
}

.message.error {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--error-color);
}

.message.success {
    background-color: rgba(52, 168, 83, 0.1);
    color: var(--success-color);
}

/* Scanner specific styles */
.scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#qr-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#qr-reader-results {
    margin-top: 1rem;
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

#code-info {
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

#code-info p {
    margin-bottom: 10px;
}

#code-info a {
    color: var(--primary-color);
    word-break: break-all;
}

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

/* Responsive styles */
@media (max-width: 600px) {
    .card {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .install-banner {
        flex-direction: column;
        gap: 1rem;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}
