/* General Styles */
body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #f6fbff 0%, #eef6ff 55%, #f7fbff 100%);
    color: #333;
}

/* Page wrapper */
.tf-page { padding: 16px 12px; }
.tf-page-inner { max-width: 1200px; margin: 0 auto; }
.tf-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin: 6px 0 14px 0; }
.tf-title { margin: 0; font-size: 28px; letter-spacing: 0.2px; }
.tf-subtitle { margin-top: 6px; font-weight: 800; opacity: 0.85; }
.tf-footer { padding: 18px 12px; text-align:center; font-weight: 800; opacity: 0.9; }

/* Cards / grids (shared) */
.tf-card { background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.10); border-radius: 14px; padding: 14px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.tf-card h2, .tf-card h3 { margin-top: 0; }
.tf-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media(max-width: 980px){ .tf-grid { grid-template-columns: 1fr; } }

/* Buttons */
.tf-btn { display:inline-block; padding: 10px 12px; border-radius: 12px; border: 0; cursor:pointer; background: #0072B5; color:#fff; font-weight: 900; text-decoration:none; }
.tf-btn:hover { filter: brightness(1.04); }
.tf-btn.secondary { background: #00A99D; }
.tf-btn.ghost { background: rgba(0,114,181,0.12); color:#0b2a3d; }
.tf-btn.danger { background: #b91c1c; }

/* Dark mode compatibility */
body.dark-mode { background: #0b1620; color: #e7eef6; }
body.dark-mode .tf-card { background: rgba(19,32,42,0.96); border-color: rgba(255,255,255,0.10); }
body.dark-mode .tf-divider { background: rgba(255,255,255,0.10); }
body.dark-mode .tf-btn.ghost { background: rgba(255,255,255,0.12); color:#e7eef6; }

/* Utilities */
.tf-muted { opacity: 0.85; }
.tf-small { font-size: 0.92rem; }
.tf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.tf-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tf-col { flex: 1; min-width: 220px; }
.tf-divider { height: 1px; background: rgba(0,0,0,0.08); margin: 14px 0; }
.tf-badge { display:inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,0.07); font-weight: 800; font-size: 12px; }
.tf-tag { display:inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(0,114,181,0.12); color:#0b2a3d; font-weight: 900; font-size: 12px; }
body.dark-mode .tf-tag { background: rgba(255,255,255,0.12); color:#e7eef6; }

/* Forms */
.tf-form label { display:block; font-weight: 800; margin: 8px 0 6px; }
.tf-form input[type=text],
.tf-form input[type=number],
.tf-form input[type=url],
.tf-form select,
.tf-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.tf-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
body.dark-mode .tf-input{ background: rgba(19,32,42,0.96); border-color: rgba(255,255,255,0.10); color: #e7eef6; }
.tf-form textarea { min-height: 120px; }
.tf-form .tf-actions { display:flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Alerts */
.tf-alert { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.12); background: rgba(255,255,255,0.85); }
.tf-alert.good { border-color: rgba(0,169,157,0.4); background: rgba(0,169,157,0.10); }
.tf-alert.warn { border-color: rgba(255,153,0,0.45); background: rgba(255,153,0,0.12); }
.tf-alert.bad { border-color: rgba(200,0,0,0.35); background: rgba(200,0,0,0.10); }
/* Navigation Bar */
.tf-navbar {
    background: linear-gradient(to right, #0072B5, #00A99D);
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 999;
}
.tf-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Navbar robustness: prevent overflow and inconsistent wrapping */
.tf-nav-inner { flex-wrap: wrap; }
.tf-nav-links { min-width: 0; }
.tf-nav-links a, .tf-nav-links .dropbtn { white-space: nowrap; }
@media (max-width: 900px) {
  .tf-nav-inner { align-items: stretch; }
  .tf-brand { flex: 1 1 auto; }
  .tf-nav-toggle { margin-left: 0; }
  .tf-nav-links a, .tf-nav-links .dropbtn { white-space: normal; }
  .dropdown-content { max-height: 60vh; overflow: auto; }
}

.tf-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.3px;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
}
.tf-brand:hover { background: rgba(255,255,255,0.15); }

.tf-nav-toggle {
    display: none;
    margin-left: auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.tf-nav-toggle:hover { background: rgba(255,255,255,0.25); }

.tf-nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.tf-nav-links a,
.tf-nav-links .dropbtn {
    color: white;
    text-decoration: none;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 800;
    display: inline-block;
    border-radius: 8px;
}

/* Make dropdown buttons look like links */
.tf-nav-links .dropbtn {
    background: transparent;
    border: 0;
    cursor: pointer;
    line-height: 1;
}
.tf-nav-links a:hover,
.tf-nav-links .dropbtn:hover,
.dropdown:hover .dropbtn {
    background: rgba(255, 255, 255, 0.2);
}
/* Dropdown Menu */
.dropdown {
    display: inline-block;
    position: relative;
}
.dropdown-content {
    display: none;
    position: absolute;
    background: #0072B5;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 10px;
    overflow: hidden;
}
.dropdown-content a {
    color: white;
    padding: 10px;
    display: block;
    text-align: left;
}
.dropdown-content a:hover {
    background: #00A99D;
}
.dropdown-content.open { display: block; }

.tf-nav-auth {
    color: white;
    text-decoration: none;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 900;
    border-radius: 8px;
    background: rgba(0,0,0,0.12);
}
.tf-nav-auth:hover { background: rgba(255,255,255,0.22); }

/* Responsive navbar */
@media (max-width: 900px) {
    .tf-nav-toggle { display: inline-block; }
    .tf-nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; }
    .tf-nav-links.open { display: flex; }
    .dropdown { width: 100%; }
    .dropdown-content { position: relative; box-shadow: none; min-width: 100%; }
    .dropdown-content.open { display: block; }
    /* tap-friendly: show submenu on focus within */
    .dropdown:focus-within .dropdown-content { display: block; }
    .tf-nav-links a, .tf-nav-links .dropbtn { width: 100%; text-align: left; }
}
/* Header */
header {
    background: #010204;
    color: white;
    text-align: center;
    padding: 10px 20px;
}

header h1 {
    margin: 0;
    font-size: 36px;
}
/* Main Content */
.container {
    max-width: 1168px;
    margin: 20px auto;
    padding: 20px;
    background: #e6f0f8;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tabs (site-wide) */
.tf-tabs { display:flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tf-tab { padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.14); background: rgba(255,255,255,0.7); cursor:pointer; font-weight: 900; }
.tf-tab.active { background: rgba(0,114,181,0.14); border-color: rgba(0,114,181,0.35); }
.tf-tabpanel { display:none; }
.tf-tabpanel.active { display:block; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.card {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #00A99D;
    transition: 0.3s;
}
.card:hover {
    background: #e0f5f5;
}
/* Footer */
footer {
    background: #0072B5;
    color: white;
    text-align: center;
    font-weight: bold;
    padding: 20px;
    margin-top: 20px;
}
/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 28px;
    }
    .container {
        padding: 15px;
    }
    .container-half {
        max-width: 100%;
  }
}
.notepad {
  background: #fffbe6;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  padding: 15px;
  max-width: 600px;
  margin: auto;
}
.notepad textarea {
  width: 100%;
  height: 300px;
  border: none;
  background: transparent;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
}
.notepad-controls {
  text-align: right;
  margin-top: 10px;
}
button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
}
button:hover {
  background: #0056b3;
}
/* Side-by-side Container Support */
.container-group {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 20px auto;
}

.container-half {
  flex: 1;
  max-width: calc(50% - 10px);
  background: #e6f0f8;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.encryption-tools textarea,
.encryption-tools select,
.encryption-tools input[type="text"],
.encryption-tools button {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    font-size: 1em;
}
#resultBlock {
    background: #f4f4f4;
    border-left: 4px solid #2196F3;
    padding: 10px;
    margin-top: 20px;
}

.weather-form {
    text-align: center;
    margin-bottom: 20px;
}
.weather-form input[type="text"],
.weather-form select {
    width: 250px;
    padding: 8px;
    margin: 5px;
    font-size: 15px;
}
.weather-form button {
    padding: 8px 12px;
    font-size: 16px;
    background-color: #2196F3;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}
.weather-now-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 20px;
    margin: 10px auto 30px auto;
    max-width: 800px;
    background-color: #f0f8ff;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
.weather-now-block .weather-icon img {
    width: 100px;
}
.weather-now-block .weather-details {
    font-size: 16px;
}
.forecast-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 10px;
}
.forecast-day {
    background: #ffffff;
    border: 2px solid #2196F3;
    border-radius: 10px;
    padding: 12px;
    width: 230px;
    box-shadow: 0 0 8px rgba(0,0,0,0.08);
    text-align: center;
}
.forecast-day h4 {
    background: #2196F3;
    color: white;
    border-radius: 6px;
    padding: 6px 0;
    margin-bottom: 10px;
    font-size: 16px;
}
.forecast-hour {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0;
    gap: 5px;
    font-size: 13px;
}
.forecast-hour img {
    width: 28px;
    height: 28px;
}
.forecast-hour .hour-label {
    width: 40px;
    font-weight: bold;
}
.forecast-hour .temp {
    width: 50px;
    text-align: right;
}
.forecast-hour .desc {
    flex: 1;
    text-align: left;
    font-style: italic;
    color: #555;
}
.radar-container {
    margin: 20px auto;
    max-width: 100%;
    border: 2px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}
@media (max-width: 768px) {
    .weather-now-block {
        flex-direction: column;
        text-align: center;
    }
    .forecast-day {
        width: 100%;
    }
}
@media (max-width: 600px) {
    .weather-now-block {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .weather-now-block .weather-icon img {
        width: 80px;
        height: auto;
    }

    .weather-form {
        flex-direction: column;
        gap: 10px;
    }

    .weather-form input[type="text"],
    .weather-form select,
    .weather-form button {
        width: 100% !important;
        max-width: 300px;
        margin: 6px auto;
    }

    .forecast-day {
        width: 100% !important;
        padding: 10px;
    }

    .forecast-hour {
        flex-direction: column;
        gap: 4px;
        align-items: center;
    }

    .forecast-hour .hour-label,
    .forecast-hour .temp,
    .forecast-hour .desc {
        text-align: center;
        width: 100% !important;
    }

    .forecast-hour img {
        width: 36px;
        height: 36px;
    }

    .radar-container iframe {
        width: 100% !important;
        height: 300px !important;
    }
}
spkrbody { 
    font-family: Arial; 
    margin: 40px; 
    text-align: center; 
}
spkrbutton { 
    font-size: 24px; 
    padding: 15px 30px; 
    margin: 20px; 
}
.weather-alert-bar {
    background: #7a1c1c;
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
}

.weather-alert-scroll {
    white-space: nowrap;
    display: inline-block;
    animation: scroll-alerts 40s linear infinite;
    padding-left: 100%;
}

@keyframes scroll-alerts {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
