* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
}

.card {
    background: rgba(15, 15, 20, 0.9);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00d4ff, #0066ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin: 0 0 2rem 0;
    line-height: 1.6;
    color: #a0aec0;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e0;
    font-size: 0.9rem;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    border: 2px solid #2d3748;
    background: rgba(26, 32, 44, 0.8);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Monaco', 'Courier New', monospace;
}

input[type="text"]:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(26, 32, 44, 1);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

input[type="text"]::placeholder {
    color: #4a5568;
}

.form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

button {
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

button[type="submit"] {
    background: linear-gradient(135deg, #00d4ff, #0066ff);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 100, 255, 0.3);
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button[type="reset"] {
    background: rgba(74, 85, 104, 0.5);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

button[type="reset"]:hover {
    background: rgba(74, 85, 104, 0.7);
    transform: translateY(-2px);
}

#loading-indicator {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    text-align: center;
    color: #00d4ff;
    font-weight: 500;
}

#loading-indicator.htmx-request {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#result {
    margin-top: 1.5rem;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.success-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-label {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.commit-hash {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    color: #e2e8f0;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    word-break: break-all;
}

.commit-link {
    display: inline-block;
    color: #00d4ff;
    text-decoration: none;
    word-break: break-all;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.commit-link:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateX(2px);
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #fca5a5;
    white-space: pre-wrap;
    line-height: 1.6;
}

.error::before {
    content: "⚠ ";
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

@media (max-width: 640px) {
    .card {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .form-buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}