:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

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

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top left, #1e1b4b, #0f172a);
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #312e81;
    top: -100px;
    right: -100px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #064e3b;
    bottom: -150px;
    left: -100px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

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

/* Container Layout */
.container {
    width: 90%;
    max-width: 1000px;
    padding: 2rem 0;
    z-index: 1;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

/* Cards (Glassmorphism) */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h2 i {
    color: var(--accent);
}

/* Status Indicators */
.status-indicator {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.status-indicator.loading {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-indicator.success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-indicator.error {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* Weather Section Specifics */
.weather-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-info h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.location-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.weather-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
}

.temp-display {
    display: flex;
    align-items: flex-start;
}

.temperature {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 0.5rem;
}

.extra-weather-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
}

.info-item strong {
    color: var(--text-primary);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-top: 1rem;
    font-size: 0.95rem;
    text-align: center;
}

/* Fingerprint Section Specifics */
.fingerprint-hash {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    word-break: break-all;
}

.fingerprint-hash .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.fingerprint-hash code {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.device-specs {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.spec-label i {
    color: var(--accent);
    width: 16px;
    text-align: center;
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    direction: ltr;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
}

/* --- New Weather Widget Redesign --- */
.widget-container {
    max-width: 850px;
    width: 95%;
}

.weather-widget {
    display: flex;
    flex-direction: column-reverse;
    background-color: #2b3038;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

@media (min-width: 768px) {
    .weather-widget {
        flex-direction: row;
        height: 500px;
    }
}

/* Left Panel */
.widget-left {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    background-color: #22252b;
}

.widget-box {
    background-color: #1c1e22;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.02);
}

.details-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-label {
    color: #fff;
}

.detail-val {
    color: #fff;
    direction: ltr;
}

.forecast-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    border-radius: 15px;
    flex: 1;
    text-align: center;
    color: #fff;
    font-weight: 700;
    transition: all 0.3s ease;
}

.forecast-day .f-day-name {
    font-size: 1rem;
}

.forecast-day .f-temp {
    font-size: 1.25rem;
}

.forecast-day.active {
    background-color: #fff;
    color: #1e2126;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.forecast-loading {
    color: #fff;
    text-align: center;
    width: 100%;
}

.update-btn {
    background: linear-gradient(to right, #6EE2F5, #6454F0);
    border: none;
    border-radius: 9999px;
    padding: 1rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 100%;
    margin-top: auto;
}

.update-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Right Panel */
.widget-right {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover no-repeat;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    color: #fff;
}

.widget-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(80, 227, 194, 0.4) 0%, rgba(74, 144, 226, 0.2) 50%, rgba(34, 37, 43, 0.8) 100%);
    z-index: 1;
}

.right-content {
    position: relative;
    z-index: 2;
    padding: 3rem 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.right-top {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.date-text, .location-text {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.right-bottom {
    text-align: right;
    margin-top: auto;
}

.huge-temp {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.weather-condition {
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
