:root {
    --bg-dark: #0f172a;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Fons animat */
.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.blob-2 {
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    z-index: 10;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.card-header h2 {
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-update {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.5);
    margin-top: 1.5rem;
}

.btn-update:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(245, 158, 11, 0.6);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
    min-height: 20px;
}

/* Dashboard elements */
.status-container {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px inset rgba(255,255,255,0.05);
}

.ip-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-block .label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.ip-block .ip-value {
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.ip-value.highlight {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.3;
}

.status-alert {
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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