:root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --primary: 217 91% 60%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4% 16%;
    --muted-foreground: 240 5% 64.9%;
    --destructive: 0 62.8% 30.6%;
    --border: 240 4% 16%;
    --radius: 0.75rem;
    --gradient-primary: linear-gradient(135deg, hsl(217 91% 60%), hsl(260 91% 60%));
    --gradient-subtle: linear-gradient(180deg, hsl(240 10% 3.9%), hsl(240 6% 8%));
    --shadow-glow: 0 0 40px hsl(217 91% 60% / 0.3);
    --shadow-elegant: 0 10px 30px -10px hsl(217 91% 60% / 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--gradient-subtle);
    color: hsl(var(--foreground));
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 28rem;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-size: 1.875rem;
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.card {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-elegant);
}

.form {
    margin-bottom: 1rem;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--secondary) / 0.5);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: var(--transition-smooth);
    margin-bottom: 0.5rem;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

.button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: var(--gradient-primary);
    color: hsl(var(--primary-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-glow);
}

.button:hover { opacity: 0.9; }
.button:disabled { opacity: 0.6; cursor: not-allowed; }

.error {
    color: hsl(var(--destructive));
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: hsl(var(--secondary) / 0.5);
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border) / 0.5);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--primary));
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.result-info {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}

.result-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: hsl(var(--secondary) / 0.5);
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid hsl(var(--border) / 0.5);
}

.result-code {
    flex: 1;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.copy-btn {
    padding: 0.5rem;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: var(--transition-smooth);
}

.copy-btn:hover {
    background: hsl(var(--primary) / 0.1);
}

.warning {
    background: linear-gradient(135deg, hsl(38 92% 50% / 0.1), hsl(38 92% 50% / 0.05));
    border: 1px solid hsl(38 92% 50% / 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    color: hsl(38 92% 30%);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.warning-icon {
    color: hsl(38 92% 50%);
    font-weight: bold;
    font-size: 1rem;
}

.hidden { display: none !important; }

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.donate-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

.donate-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: hsl(var(--muted-foreground));
    transition: var(--transition-smooth);
    padding: 0.5rem;
    border-radius: calc(var(--radius) - 4px);
}

.donate-link:hover {
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
}

.donate-icon {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 350px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid #333;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #4ade80;
}

.toast-description {
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 1px;
}