/* TOOLS API STYLES - PREMIUM */

:root {
    --api-weather-bg: linear-gradient(135deg, #3b82f6, #2563eb);
    --api-news-bg: linear-gradient(135deg, #ef4444, #b91c1c);
    --api-dict-bg: linear-gradient(135deg, #10b981, #059669);
    --api-brasil-bg: linear-gradient(135deg, #f59e0b, #d97706);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* CONTAINER */
.api-tool-container {
    padding: 32px;
    height: 100%;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 70%);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.api-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.api-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 4px;
}

/* CARDS GENERICS */
.api-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.api-header-sm {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.api-header-sm i {
    font-size: 1.5rem;
    color: var(--primary-400);
}

.api-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* WEATHER SPECIFIC */
.weather-widget {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.05));
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 40px;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.weather-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.preset-cities {
    display: flex;
    gap: 8px;
}

.city-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.city-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.city-search {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.city-search input {
    background: transparent;
    border: none;
    color: white;
    padding: 6px 12px;
    outline: none;
    min-width: 200px;
}

.city-search button {
    background: var(--primary-500);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-header {
    text-align: center;
    margin-bottom: 16px;
}

.weather-icon-lg {
    font-size: 6rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: float 6s ease-in-out infinite;
    color: #fcd34d;
}

.weather-temp-main {
    font-size: 5rem;
    font-weight: 200;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.weather-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 32px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

.weather-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

.weather-metric i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #93c5fd;
}

.weather-forecast {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-item {
    text-align: center;
    padding: 12px;
    min-width: 80px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* NEWS CATEGORIES & GRID */
.news-categories-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.news-cat-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.news-cat-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.news-cat-btn.active {
    background: var(--api-news-bg);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.news-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.news-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
    color: #f1f5f9;
}

.news-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* BRASIL DATA */
.brasil-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
}

.brasil-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.brasil-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-wrap {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.modern-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.modern-btn {
    background: var(--primary-600);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modern-btn:hover {
    background: var(--primary-500);
}

.info-block h4 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 12px;
    color: #cbd5e1;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-block p {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: #e2e8f0;
}

/* BANKS LIST */
.banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.bank-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: background 0.2s;
}

.bank-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bank-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-400);
    margin-bottom: 4px;
}

.bank-name {
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
}

.bank-ispb {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

/* ANIMATION UTILS */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}