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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: #2e3842;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 3em;
}

.header a img {
    height: 100%
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    height: 40px;
    width: 40px;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover:not(.disabled) {
    color: #495057;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #2e3842;
    border-bottom-color: #2e3842;
    background-color: #fff;
}

.tab-button.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.tab-button.completed {
    color: #28a745;
    border-bottom-color: #28a745;
}

.tab-button.completed::after {
    content: " ✓";
    font-weight: bold;
}

/* Tab Content */
.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h2 {
    margin-bottom: 2rem;
    color: #2e3842;
    text-align: center;
    font-size: 1.5rem;
}

/* Device Selection */
.device-selection {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.device-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 3rem;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 180px;
    text-decoration: none;
    color: #333;
}

.device-button:hover {
    border-color: #2e3842;
    box-shadow: 0 4px 12px rgba(46, 56, 66, 0.1);
    transform: translateY(-2px);
}

.device-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.device-button span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: #2e3842;
    box-shadow: 0 0 0 3px rgba(46, 56, 66, 0.1);
}

.form-group input.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.api-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
}

.api-error.show {
    display: block;
}

/* Checkbox Styles */
.checkbox-group {
    position: relative;
}

.checkbox-group input[type="checkbox"] {
    float: left;
    margin-top: 2px;
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2e3842;
}

.checkbox-label {
    display: block;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.4;
    overflow: hidden;
}

.small-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    margin-left: 2.75rem;
    line-height: 1.4;
}

.checkbox-group .small-text {
    margin-left: 2.75rem;
}

.checkbox-label a,
.small-text a {
    color: #6c757d;
    text-decoration: underline;
}

.checkbox-label a:hover,
.small-text a:hover {
    color: #495057;
}

.guarantee-text {
    color: #6c757d;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.skip-button {
    background: none;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skip-button:hover {
    background-color: #6c757d;
    color: white;
}

.next-button {
    background-color: #2e3842;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.next-button:hover {
    background-color: #1a2028;
}

.next-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

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

/* Success State Styles */
.success-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-content h2 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.success-content p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.success-actions {
    margin-top: 2rem;
}

.continue-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.continue-button:hover {
    background-color: #218838;
}

.continue-button.primary {
    background-color: #2e3842;
}

.continue-button.primary:hover {
    background-color: #1a2028;
}

/* Setup Content */
.setup-content {
    display: none;
}

.setup-content.active {
    display: block;
}

.setup-content h3 {
    color: #2e3842;
    margin-bottom: 1rem;
}

.setup-content ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.setup-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: #2e3842;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .device-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .device-button {
        width: 100%;
        max-width: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .skip-button,
    .next-button {
        width: 100%;
    }
}