@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800&display=swap');

:root {
    --bg-color: #051024;
    --text-color-primary: #24313c;
    --card-bg: #ffffff;
    --accent-color: #00a8e8;
    --bloom-color-1: rgba(0, 168, 232, 0.4);
    --bloom-color-2: rgba(100, 255, 218, 0.3);
}

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

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.bloom-effect {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

.bloom-1 {
    width: 400px;
    height: 400px;
    background: var(--bloom-color-1);
    top: -50px;
    left: -50px;
}

.bloom-2 {
    width: 500px;
    height: 500px;
    background: var(--bloom-color-2);
    bottom: 0;
    right: -100px;
    animation-delay: -5s;
}

.bloom-3 {
    width: 300px;
    height: 300px;
    background: rgba(120, 80, 255, 0.25);
    top: 40%;
    left: 20%;
    animation-duration: 15s;
    filter: blur(100px);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 40px) scale(1.1);
    }
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    width: 100%;
    background: rgba(5, 16, 36, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    margin-right: 20px;
}

header h1 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px 60px;
}

.forecast-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 1080px;
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.8s ease-out forwards;
}

.export-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.header-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-field {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.card-header h2 {
    font-size: 2rem;
    color: #1a1a1a;
    font-weight: 800;
    flex: 0 0 auto;
}

.header-input {
    min-width: 260px;
    max-width: 420px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d8e3ed;
    border-radius: 10px;
    background: #f8fbfd;
    color: #24313c;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

.header-field-wide .header-input {
    max-width: none;
    flex: 1 1 320px;
}

.header-input:focus {
    border-color: rgba(0, 168, 232, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.12);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.image-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-tile {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
    border: 1px solid #d8e3ed;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.image-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(5, 16, 36, 0.12);
    border-color: rgba(0, 168, 232, 0.35);
}

.image-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #dfe9f2;
    cursor: pointer;
}

.image-tile img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.image-caption {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #506171;
    text-align: left;
    cursor: text;
    padding: 4px 0;
    border-radius: 10px;
    outline: none;
}

.image-caption:focus {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 168, 232, 0.2);
}

.editor-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    background: #f4f8fb;
    border: 1px solid #dde7ef;
}

.toolbar button {
    min-width: 48px;
    padding: 10px 14px;
    border: 1px solid #cfdce7;
    border-radius: 10px;
    background: #ffffff;
    color: #20303e;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.toolbar button svg {
    width: 18px;
    height: 18px;
    display: block;
    margin: 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toolbar button:hover {
    background: #eaf6fc;
    border-color: rgba(0, 168, 232, 0.55);
    color: #005f8f;
}

.editor {
    min-height: 320px;
    padding: 22px;
    border: 1px solid #d8e3ed;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(5, 16, 36, 0.05);
    font-size: 1.05rem;
    line-height: 1.7;
    outline: none;
}

.editor:empty::before {
    content: attr(data-placeholder);
    color: #8a98a7;
}

.editor ul {
    padding-left: 24px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.clear-button {
    min-width: 130px;
    padding: 12px 18px;
    border: 1px solid #c53b3b;
    border-radius: 10px;
    background: linear-gradient(180deg, #ef5350 0%, #d9342b 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.clear-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(217, 52, 43, 0.24);
    filter: brightness(1.02);
}

.export-button {
    min-width: 130px;
    padding: 12px 18px;
    border: 1px solid #0a8ec2;
    border-radius: 10px;
    background: linear-gradient(180deg, #10b5ef 0%, #009bd8 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.export-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 168, 232, 0.24);
    filter: brightness(1.02);
}

.export-button:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

@media (max-width: 900px) {
    .image-grid {
        grid-template-columns: 1fr;
    }

    .forecast-card {
        padding: 26px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 15px 20px;
    }

    .logo {
        height: 42px;
        margin-right: 14px;
    }

    header h1 {
        font-size: 1.1rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .header-input {
        min-width: 100%;
        max-width: none;
    }

    .toolbar button {
        min-width: 60px;
        padding: 9px 12px;
    }

    .card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .editor {
        min-height: 260px;
        padding: 18px;
    }
}
