/* ============================================================================
   GLOBAL STYLES & VARIABLES
   ============================================================================ */

:root {
    --primary-orange: #FF8600;
    --orange-hover: #CC6B00;
    --text-color: #333;
    --text-light: #666;
    --background-color: #fff;
    --background-light: #f5f5f5;
    --border-color: #ddd;
    --font-family: 'Roboto', sans-serif;
    --spacing-unit: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* ============================================================================
   NAVIGATION BAR
   ============================================================================ */

.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo a:hover {
    color: var(--orange-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 3);
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-orange);
}

.nav-register {
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5);
    border-radius: 4px;
}

.nav-register:hover {
    background-color: var(--primary-orange);
    color: white;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    padding: calc(var(--spacing-unit) * 4);
}

.hero-container {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: calc(var(--spacing-unit) * 4);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    min-height: 44px;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    border: 2px solid var(--primary-orange);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--orange-hover);
    border-color: var(--orange-hover);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 134, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

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

.btn-submit {
    width: 100%;
    margin-top: calc(var(--spacing-unit) * 2);
}

/* ============================================================================
   TESTER SECTION
   ============================================================================ */

.tester-section {
    background-color: var(--background-light);
    padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 3);
}

.tester-container {
    max-width: 800px;
    margin: 0 auto;
}

.tester-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 1);
    text-align: center;
}

.tester-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

/* ============================================================================
   FORM STYLES
   ============================================================================ */

.tester-form {
    background-color: white;
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 1.5);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 134, 0, 0.1);
}

.form-control:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: calc(var(--spacing-unit) * 0.5);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ============================================================================
   RESULTS BOX
   ============================================================================ */

.results-container {
    background-color: white;
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.results-box {
    background-color: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: calc(var(--spacing-unit) * 2);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.results-placeholder {
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

.results-error {
    background-color: #fee;
    color: #c00;
    border-color: #fcc;
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 4px;
    margin: 0;
}

.results-success {
    background-color: #efe;
    color: #060;
    border-color: #cfc;
}

/* ============================================================================
   MODAL STYLES
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 2.5);
}

.modal-body p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.modal-footer {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: calc(var(--spacing-unit) * 1);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablets */
@media (max-width: 768px) {
    .nav-container {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    }

    .nav-menu {
        gap: calc(var(--spacing-unit) * 2);
    }

    .hero-buttons {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 1.5);
    }

    .btn {
        width: 100%;
    }

    .tester-section {
        padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    }

    .tester-container {
        padding: 0 calc(var(--spacing-unit) * 1);
    }

    .tester-form,
    .results-container {
        padding: calc(var(--spacing-unit) * 2);
    }

    .modal-content {
        width: 95%;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .nav-logo a {
        font-size: 1.25rem;
    }

    .nav-menu {
        gap: calc(var(--spacing-unit) * 1);
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .hero-section {
        padding: calc(var(--spacing-unit) * 2);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .tester-title {
        font-size: 1.5rem;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .results-box {
        min-height: 150px;
        max-height: 300px;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.conditional-field {
    display: block;
}

.conditional-field.hidden {
    display: none;
}
