/* home.css — Anasayfa page specific styles */

/* ============================================================
   WRAPPER
   ============================================================ */

.home-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

/* ============================================================
   STATUS BAR
   ============================================================ */

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.clock-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.clock-capsule:hover {
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.08);
}

.clock-icon {
    font-size: 0.85rem;
    color: rgba(0, 210, 255, 0.65);
}

#live-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #00d2ff;
    text-transform: uppercase;
}

.status-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: #00ff88;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: unset;
    text-align: unset;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #00ff88;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px currentColor;
    }

    50% {
        opacity: 0.35;
        box-shadow: 0 0 2px currentColor;
    }
}

/* ============================================================
   WIDGET PANEL HEADERS
   ============================================================ */

.widget-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(0, 210, 255, 0.12);
    flex-shrink: 0;
}

.panel-code {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(0, 210, 255, 0.88);
    font-weight: 600;
}

.panel-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    color: #00ff88;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 5px;
    height: 5px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px #00ff88;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.status-dot--loading {
    background: #00d2ff;
    box-shadow: 0 0 6px #00d2ff;
    animation: pulseGlowCyan 1.5s ease-in-out infinite;
}

.status-dot--error {
    background: #ff3333;
    box-shadow: 0 0 6px #ff3333;
    animation: pulseGlowRed 2s ease-in-out infinite;
}

.status-dot--waiting {
    background: #ffa500;
    box-shadow: 0 0 6px #ffa500;
    animation: pulseGlowOrange 2s ease-in-out infinite;
}

@keyframes pulseGlowCyan {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 2px #00d2ff; }
    50% { opacity: 1; box-shadow: 0 0 8px #00d2ff; }
}

@keyframes pulseGlowRed {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 2px #ff3333; }
    50% { opacity: 1; box-shadow: 0 0 8px #ff3333; }
}

@keyframes pulseGlowOrange {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 2px #ffa500; }
    50% { opacity: 1; box-shadow: 0 0 8px #ffa500; }
}

.panel-id {
    position: absolute;
    bottom: 0.55rem;
    right: 0.7rem;
    font-family: 'Courier New', monospace;
    font-size: 0.52rem;
    color: rgba(0, 210, 255, 0.2);
    letter-spacing: 0.04em;
    pointer-events: none;
}

.widget-inner {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   WIDGET CARDS
   ============================================================ */

.widget-card {
    background-color: rgba(4, 16, 36, 0.75);
    background-image: repeating-linear-gradient(0deg,
            transparent,
            transparent 3px,
            rgba(0, 210, 255, 0.013) 3px,
            rgba(0, 210, 255, 0.013) 4px);
    border: 1px solid rgba(0, 210, 255, 0.28);
    border-radius: 12px;
    padding: 1rem 1.1rem 1.5rem;
    min-height: 155px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.28s ease,
        box-shadow 0.28s ease;
    position: relative;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

/* corner bracket decoration */
.widget-card::before,
.widget-card::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    border-color: rgba(0, 210, 255, 0.35);
    border-style: solid;
    transition: border-color 0.28s ease;
}

.widget-card::before {
    top: 5px;
    left: 5px;
    border-width: 1.5px 0 0 1.5px;
}

.widget-card::after {
    bottom: 5px;
    right: 5px;
    border-width: 0 1.5px 1.5px 0;
}

.widget-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 10px 32px rgba(0, 210, 255, 0.12);
}

.widget-card:hover::before,
.widget-card:hover::after {
    border-color: rgba(0, 210, 255, 0.65);
}

.weather-widget,
.wordle-widget,
.picker-widget {
    cursor: pointer;
}

/* ============================================================
   DASHBOARD WIDGETS GRID
   ============================================================ */

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(0, 210, 255, 0.18);
}

.divider-label {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: rgba(0, 210, 255, 0.45);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ============================================================
   BENTO GRID
   ============================================================ */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.bento-card--wide {
    grid-column: span 2;
}


.bento-card--chat {
    grid-column: 4;
    grid-row: span 2;
}

/* ============================================================
   BENTO CARD BASE
   ============================================================ */

.bento-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.05rem 1.05rem 0.9rem;
    background-color: rgba(4, 13, 30, 0.8);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
    min-height: 175px;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.55);
    box-shadow: 0 12px 36px rgba(0, 210, 255, 0.14);
    text-decoration: none;
    color: inherit;
}

.bento-card:active {
    transform: translateY(-2px) scale(0.984);
    transition: transform 75ms ease;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        250px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(0, 210, 255, 0.08),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover::before {
    opacity: 1;
}

/* ============================================================
   CARD CORNER BRACKETS
   ============================================================ */

.card-corner {
    position: absolute;
    width: 9px;
    height: 9px;
    border-color: rgba(0, 210, 255, 0.3);
    border-style: solid;
    transition: border-color 0.24s ease;
}

.card-corner.tl {
    top: 5px;
    left: 5px;
    border-width: 1.5px 0 0 1.5px;
}

.card-corner.tr {
    top: 5px;
    right: 5px;
    border-width: 1.5px 1.5px 0 0;
}

.card-corner.bl {
    bottom: 5px;
    left: 5px;
    border-width: 0 0 1.5px 1.5px;
}

.card-corner.br {
    bottom: 5px;
    right: 5px;
    border-width: 0 1.5px 1.5px 0;
}

.bento-card:hover .card-corner {
    border-color: rgba(0, 210, 255, 0.68);
}

/* ============================================================
   CARD TOP BAR
   ============================================================ */

.card-top-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.card-icon {
    font-size: 0.82rem;
    color: rgba(0, 210, 255, 0.65);
    flex-shrink: 0;
    transition: color 0.24s;
}

.bento-card:hover .card-icon {
    color: rgba(0, 210, 255, 0.95);
}

.card-code {
    font-family: 'Courier New', monospace;
    font-size: 0.70rem;
    letter-spacing: 0.1em;
    color: rgba(0, 210, 255, 0.68);
    text-transform: uppercase;
    flex-grow: 1;
    transition: color 0.24s;
}

.bento-card:hover .card-code {
    color: var(--accent-hover);
}

.card-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    color: #00ff88;
    flex-shrink: 0;
}

.card-badge--live {
    color: #00ff88;
}

.card-pulse-dot {
    width: 5px;
    height: 5px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px #00ff88;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* ============================================================
   CARD BODY
   ============================================================ */

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.card-body--center {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.45rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.card-desc {
    font-size: 0.87rem;
    color: var(--text-secondary, #8da4be);
    margin: 0;
    line-height: 1.4;
}

.chat-big-icon {
    font-size: 2.4rem;
    color: rgba(0, 210, 255, 0.4);
    transition: color 0.24s, transform 0.35s;
    margin-bottom: 0.3rem;
}

.bento-card:hover .chat-big-icon {
    color: rgba(0, 210, 255, 0.85);
    transform: scale(1.08);
}

/* ============================================================
   CARD DIVIDER & STATS
   ============================================================ */

.card-divider {
    height: 1px;
    background: rgba(0, 210, 255, 0.11);
    margin: 0.65rem 0 0.55rem;
    flex-shrink: 0;
}

.card-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.card-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stat-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: rgba(0, 210, 255, 0.65);
    text-transform: uppercase;
}

.stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-hover);
    letter-spacing: 0.05em;
}

/* ============================================================
   WEATHER CONTENT (unchanged JS-injected structure)
   ============================================================ */

.weather-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

.weather-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-temp-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}

.weather-city {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-hover);
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-city i {
    font-size: 0.72rem;
}

.weather-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.weather-icon-large {
    font-size: 2.4rem;
    transition: transform 0.8s ease;
}

.weather-widget:hover .weather-icon-large {
    transform: rotate(15deg) scale(1.1);
}

.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--text-secondary);
    font-size: 0.88rem;
    gap: 10px;
    min-height: 60px;
}

/* ============================================================
   QUOTE CONTENT
   ============================================================ */

.quote-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.quote-text {
    font-size: 0.98rem;
    font-style: italic;
    color: #ffffff;
    line-height: 1.55;
    margin: 0 0 0.5rem;
    font-weight: 300;
}

.quote-author {
    font-size: 0.78rem;
    color: var(--accent-hover);
    text-align: right;
    margin: 0;
    font-weight: 500;
}

/* ============================================================
   WORDLE MINI WIDGET
   ============================================================ */

.wordle-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin: 0.4rem auto;
    width: 100%;
    max-width: 170px;
}

.wordle-mini-cell {
    aspect-ratio: 1;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wordle-mini-cell.correct {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #000;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.35);
}

.wordle-mini-cell.present {
    background: #2a6b94;
    border-color: #2a6b94;
}

.wordle-mini-cell.absent {
    background: #3a3a3c;
    border-color: #3a3a3c;
}

.wordle-status-badge {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wordle-status-badge.won {
    background: rgba(83, 141, 78, 0.25);
    color: #00d2ff;
    border: 1px solid rgba(106, 255, 94, 0.2);
}

.wordle-status-badge.lost {
    background: rgba(255, 80, 80, 0.15);
    color: rgba(0, 208, 255, 0.36);
    border: 1px solid rgba(255, 112, 112, 0.2);
}

.wordle-status-badge.play {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-hover);
    border: 1px solid rgba(0, 210, 255, 0.25);
}

.wordle-widget:hover .wordle-mini-cell:not(.correct):not(.present):not(.absent) {
    background: rgba(255, 255, 255, 0.08);
}

.wordle-widget:hover .wordle-status-badge.play {
    background: var(--accent-hover);
    color: #000;
    border-color: var(--accent-hover);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.45);
    transform: scale(1.05);
}

.wordle-widget:hover .wordle-status-badge.won {
    background: #00d2ff;
    color: #fff;
    box-shadow: 0 0 12px rgba(83, 141, 78, 0.45);
    transform: scale(1.05);
}

/* ============================================================
   MINI WHEEL
   ============================================================ */

.mini-wheel-svg {
    animation: spinSlow 12s linear infinite;
    transform-origin: center;
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   CITY MODAL — GO BUTTON
   ============================================================ */

.go-btn {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid var(--accent-hover);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
}

.go-btn:hover {
    background: var(--accent-hover);
    color: #000;
}

/* ============================================================
   PROVINCE / DISTRICT SELECTS
   ============================================================ */

#province-select,
#district-select {
    background-color: rgba(10, 14, 23, 0.95);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    height: 45px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px !important;
}

#province-select:hover,
#district-select:hover {
    border-color: var(--accent-hover);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.2);
}

#province-select:focus,
#district-select:focus {
    border-color: var(--accent-hover);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
}

/* ============================================================
   DEAKTİF MODÜL KARTLARI
   ============================================================ */
.bento-card--inactive {
    pointer-events: auto;
}

.bento-card--inactive:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(0, 210, 255, 0.2);
}

.card-badge--maint {
    color: #ff4444 !important;
}

.card-badge--maint .card-pulse-dot {
    background: #ff4444 !important;
    box-shadow: 0 0 4px #ff4444 !important;
    animation: none !important;
}

/* ============================================================
   TECH TICKER ENHANCEMENTS
   ============================================================ */

.tech-banner {
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 7%,
            black 93%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 7%,
            black 93%,
            transparent 100%);
}

.tech-item:hover img {
    filter: brightness(2.2);
    transition: filter 0.2s ease;
}

.tech-item:hover span {
    color: #ffffff;
    font-weight: 600;
}

/* ============================================================
   RESPONSIVE — TABLET  (768px – 1023px)
   ============================================================ */

@media (max-width: 1023px) {
    .home-wrapper {
        padding: 1rem 1.2rem 2.5rem;
    }

    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* On tablet, wide cards span full width */
    .bento-card--wide {
        grid-column: 1 / -1;
    }

    /* Chat: no row-span or column-span placement on tablet */
    .bento-card--chat {
        grid-column: unset;
        grid-row: unset;
    }

}

/* ============================================================
   RESPONSIVE — MOBILE  (< 768px)
   ============================================================ */

@media (max-width: 767px) {
    .home-wrapper {
        padding: 0.75rem 0.85rem 2rem;
    }

    .status-bar {
        font-size: 0.58rem;
        padding: 0.35rem 0.7rem;
    }

    .clock-capsule {
        padding: 0.15rem 0.45rem;
        gap: 4px;
    }
    .clock-icon {
        font-size: 0.75rem;
    }
    #live-clock {
        font-size: 0.8rem;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .widget-card {
        min-height: auto;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .bento-card--wide,
    .bento-card--tall,
    .bento-card--chat {
        grid-column: unset;
        grid-row: unset;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .weather-temp {
        font-size: 1.7rem;
    }

    .wordle-mini-grid {
        max-width: 145px;
        gap: 4px;
    }

    .section-divider {
        margin-bottom: 0.9rem;
    }
}