@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

:root {
    --bg-1: #1a1a2e;
    --bg-2: #16213e;
    --panel: #0f0f1e;
    --muted: #7a7a9a;
    --accent: #667eea;
    --gap: 18px;
    --container-padding: 16px;
}

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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
    min-height: 100vh;
    padding: var(--container-padding);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.status-bar {
    background: #000000aa;
    color: #fff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px 10px 0 0;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard {
    background: var(--panel);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.header {
    background: url('header-bg-weather.php') center/cover no-repeat;
    background-attachment: fixed;
    color: #fff;
    padding: clamp(12px, 3vw, 28px);
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(255, 0, 110, 0.1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.header h1, .header p {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.5), 0 0 20px rgba(131, 56, 236, 0.3);
}

.header h1 {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 300;
    margin-bottom: 6px;
}

.header p {
    font-size: clamp(12px, 1.8vw, 14px);
    opacity: 0.95;
}

.content {
    padding: clamp(12px, 2vw, 24px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
}

.card {
    background: var(--bg-1);
    border-radius: 12px;
    padding: clamp(12px, 1.8vw, 20px);
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Android-style client info card */
.card.client-info {
    border-left-color: #ff5722;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding: 16px;
}
.client-info .info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}
.client-info .ci-row {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.02);
}
.client-info .ci-label {
    font-size: 0.72rem;
    color: #cfcfe6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.client-info .ci-value {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 0.92rem;
    color: #fff;
    word-break: break-word;
}
.client-info .ci-headers {
    grid-column: 1 / -1;
    max-height: 180px;
    overflow: auto;
}
.client-info pre {
    white-space: pre-wrap;
    margin: 0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #e8e8ef;
}

.card.weather {
    border-left-color: #ff9800;
}

.card.exchange {
    border-left-color: #4caf50;
}

.card.info {
    border-left-color: #2196f3;
}

.card.dns {
    border-left-color: #e91e63;
}

.card-title {
    font-size: 0.8rem;
    color: #a0a0c0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-content {
    font-size: clamp(18px, 3.5vw, 28px);
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-detail {
    font-size: 0.9rem;
    color: #b0b0d0;
    margin-top: 10px;
}

.time-display {
    font-size: clamp(20px, 6vw, 36px);
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Orbitron', 'Share Tech Mono', 'Courier New', monospace;
    text-align: left;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
    min-height: 1em;
    width: 100%;
    overflow: hidden;
    color: #ffffff;
}

.date-display {
    font-size: 0.85rem;
    color: #a0a0c0;
    text-align: center;
    text-transform: uppercase;
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.weather-item {
    background: #0f0f1e;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #2a2a4e;
}

.weather-item-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.weather-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0ff;
}

.exchange-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.exchange-item {
    background: #0f0f1e;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #2a2a4e;
}

.exchange-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: #4caf50;
}

.dns-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

input, select {
    padding: 12px;
    border: 1px solid #3a3a5e;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #0f0f1e;
    color: #e0e0ff;
    width: 100%;
    box-sizing: border-box;
}

input::placeholder, select::placeholder {
    color: #9a9ab4;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.btn-submit {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.12s, box-shadow 0.12s;
    width: auto;
    align-self: start;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

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

.dns-result {
    background: #0f0f1e;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #2a2a4e;
    margin-top: 12px;
    font-size: 0.9rem;
    max-height: 240px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    color: #80ff80;
    word-break: break-word;
}

.success {
    color: #4caf50;
}

.error {
    color: #f44336;
}

.refresh-btn {
    background: #0f3460;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #16213e;
}

.footer {
    background: #0a0a15;
    padding: 14px;
    text-align: center;
    font-size: 11px;
    color: #7a7a9a;
    border-top: 1px solid #2a2a4e;
}

.info-text {
    font-size: 11px;
    color: #7a7a9a;
    margin-top: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr 1fr;
    }
    .card {
        padding: 12px;
    }
    .card-content {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .content {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .btn-submit {
        width: 100%;
        align-self: stretch;
    }
    .weather-grid, .exchange-details {
        grid-template-columns: 1fr;
    }
    .status-bar {
        font-size: 0.85rem;
        padding: 8px;
    }
}

@media (min-width: 1400px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    .card {
        padding: 22px;
    }
}
