:root {
    /* Color Palette - Premium Dark Theme with Vibrant Accents */
    --bg-base: #0f172a;
    --bg-gradient-1: #1e1b4b;
    --bg-gradient-2: #0f172a;
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.5);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.4);
    
    --error: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;
    
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(148, 163, 184, 0.2);
    --input-focus: #8b5cf6;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    background-image: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background-color: rgba(139, 92, 246, 0.3);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background-color: rgba(16, 185, 129, 0.2);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 1;
    position: relative;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo svg {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-indicator .text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.hidden-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.active-section {
    display: block;
    animation: slideUpFade 0.5s ease forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography & Content */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrapper, .select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon, .select-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.input-icon {
    left: 16px;
}

.select-icon {
    right: 16px;
}

input, select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 48px; /* Left padding for icon */
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    appearance: none;
}

select {
    padding-left: 16px; /* Reset for select */
    padding-right: 48px;
}

input:focus, select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

/* Buttons */
button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.success {
    background: var(--success);
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-primary.success:hover {
    background: var(--success-hover);
    box-shadow: 0 6px 20px var(--success-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.1);
}

.btn-icon {
    width: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Loading State */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .loader {
    display: block;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Asset Info Display */
.asset-info-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
}

.info-value.highlight {
    color: var(--primary);
}

.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-main);
}

.state-installed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.readonly-value {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 24px 0;
}

/* Success Section */
.center-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    color: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.success-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

.mt-4 {
    margin-top: 16px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white;
    font-size: 0.9rem;
    animation: slideInRight 0.3s ease forwards;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.toast.error {
    border-left-color: var(--error);
}

.toast.success {
    border-left-color: var(--success);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}
