/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    background: #f6f8fa;
    min-height: 100vh;
    line-height: 1.5;
    color: #24292f;
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: splashFadeOut 0.5s ease 2s forwards;
}

.splash-logo {
    position: relative;
    text-align: center;
    animation: logoEntrance 1s ease forwards;
}

.logo-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: iconFloat 2s ease infinite;
}

.logo-text {
    font-size: 42px;
    font-weight: 600;
    color: #24292f;
    text-shadow: 0 0 20px rgba(9, 105, 218, 0.3),
                 0 0 40px rgba(9, 105, 218, 0.2);
    animation: textGlow 2s ease infinite;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(9, 105, 218, 0.2) 0%, transparent 70%);
    animation: glowPulse 2s ease infinite;
    pointer-events: none;
}

/* Splash Animations */
@keyframes splashFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(9, 105, 218, 0.3),
                     0 0 40px rgba(9, 105, 218, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(9, 105, 218, 0.5),
                     0 0 60px rgba(9, 105, 218, 0.3),
                     0 0 80px rgba(9, 105, 218, 0.2);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* App Container */
.app-container {
    opacity: 0;
    animation: appFadeIn 0.8s ease 2.5s forwards;
}

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

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #d0d7de;
    padding: 16px 0;
    margin-bottom: 24px;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon {
    font-size: 28px;
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: #24292f;
}

.nav-subtitle {
    font-size: 14px;
    color: #57606a;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* Card styles */
.card {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #24292f;
    font-weight: 600;
    font-size: 14px;
}

.required {
    color: #cf222e;
}

.optional {
    color: #57606a;
    font-weight: 400;
    font-size: 12px;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 5px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background-color: #ffffff;
    color: #24292f;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    line-height: 20px;
}

input[type="text"]:hover,
select:hover,
textarea:hover {
    border-color: #8c959f;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
}

input[type="text"].error,
select.error {
    border-color: #cf222e;
}

input[type="text"].error:focus,
select.error:focus {
    box-shadow: 0 0 0 3px rgba(207, 34, 46, 0.3);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Error messages */
.error-message {
    display: block;
    color: #cf222e;
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 400;
}

/* Button styles */
.analyze-btn {
    width: 100%;
    padding: 5px 16px;
    background: #2da44e;
    color: #ffffff;
    border: 1px solid rgba(27, 31, 36, 0.15);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    line-height: 20px;
    min-height: 32px;
}

.analyze-btn:hover:not(:disabled) {
    background: #2c974b;
    border-color: rgba(27, 31, 36, 0.15);
}

.analyze-btn:active:not(:disabled) {
    background: #298e46;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.15);
}

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

.analyze-btn.loading .btn-text {
    opacity: 0;
}

.analyze-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Results section */
.results {
    display: grid;
    gap: 16px;
}

.result-card {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 16px;
    transition: border-color 0.2s ease;
}

.result-card:hover {
    border-color: #8c959f;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d7de;
}

.result-icon {
    font-size: 20px;
}

h2 {
    color: #24292f;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    padding: 8px 0;
    color: #24292f;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
    border-bottom: 1px solid #f6f8fa;
}

.result-list li:last-child {
    border-bottom: none;
}

.result-list li:not(.placeholder)::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: #0969da;
    font-weight: bold;
    font-size: 16px;
}

.result-list li.placeholder {
    color: #57606a;
    font-style: italic;
    padding-left: 0;
    border-bottom: none;
}

.result-list li.placeholder::before {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-subtitle {
        font-size: 12px;
    }

    .container {
        padding: 0 16px 24px;
    }

    .card {
        padding: 16px;
    }

    .nav-title {
        font-size: 18px;
    }

    .logo-text {
        font-size: 28px;
    }

    .logo-icon {
        font-size: 60px;
    }

    .result-card {
        padding: 12px;
    }
}

/* Smooth animations */
.result-card {
    animation: fadeIn 0.4s ease;
}

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