:root {
    --primary: #008000;
    --primary-dark: #006400;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 128, 0, 0.15) 0px, transparent 50%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

header {
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #f8fafc, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 128, 0, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(0, 128, 0, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 128, 0, 0);
    }
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.btn-primary {
    position: relative;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 128, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.preview-container {
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.preview-container h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.preview-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.preview-wrapper.loading .preview-loader {
    display: flex;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s;
}

.icon {
    width: 20px;
    height: 20px;
}

.loader {
    display: none;
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.btn-primary.loading .btn-content {
    transform: scale(0.9);
    opacity: 0;
}

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

.status-message {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    height: 1.25rem;
    transition: all 0.3s;
}

.status-message.error {
    color: #f87171;
}

.status-message.success {
    color: #4ade80;
}

footer {
    margin-top: 2rem;
    color: #475569;
    font-size: 0.875rem;
}