/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Full-width override for landing page */
.landing-page {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid #e0e0e0;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #e74c3c;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #e74c3c;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Error Message */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
}

.warning-message p {
    margin: 0;
    font-size: 14px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Dashboard */
.dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
}

.dashboard-header h1 {
    color: #e74c3c;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #666;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    color: #333;
}

/* Passwords List */
.passwords-list {
    padding: 30px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 40px;
}

.password-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.password-item:hover {
    border-color: #e74c3c;
    background: white;
}

.password-item-info h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.password-item-info p {
    color: #666;
    margin: 5px 0;
}

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

.btn-show-password {
    background: #27ae60;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-show-password:hover {
    background: #229954;
}

/* Modal */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

/* TOTP Setup */
.totp-setup {
    text-align: center;
}

.qr-code-container {
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.qr-code {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.totp-info {
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.totp-info code {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #e74c3c;
    word-break: break-all;
    display: inline-block;
    margin-top: 5px;
}

.totp-group {
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.totp-info-box {
    margin-top: 14px;
    padding: 12px 14px;
    background: #e8f5e9;
    border: 1px solid #27ae60;
    border-radius: 6px;
}

.totp-info-box p {
    margin: 0;
    color: #27ae60;
    font-weight: 600;
    font-size: 14px;
}

.input-readonly {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .password-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .qr-code {
        max-width: 250px;
    }
}

/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    width: 100%;
    margin: 0;
    padding: 0;
}

.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
}

.hero-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.logo {
    margin-bottom: 30px;
}

.app-title {
    font-size: 4rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.orbit-icon {
    font-size: 4rem;
}

.tagline {
    font-size: 1.5rem;
    color: #27ae60;
    font-weight: 500;
    margin-top: 10px;
}

.hero-description {
    max-width: 600px;
    margin: 30px auto 40px;
}

.hero-description p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
}

.feature-item h3 {
    color: #e74c3c;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 180px;
}

.btn-secondary {
    background: #27ae60;
    color: white;
}

.btn-secondary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .orbit-icon {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-large {
        width: 100%;
    }
}

