/* ==== RESET & BASE ==== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    background: #f6f6f6;
    color: #232436;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==== HEADER & LOGO & MENU ==== */
header {
    background: #1a2133;
    color: #fff;
    padding: 1.1em 2em;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
header > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
}
header > div > a img {
    display: block;
    height: 40px;
    margin: 0 auto;
}
.menu-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.menu-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    cursor: pointer;
}
.menu-icon-link img {
    width: 36px;
    height: 36px;
    display: block;
    filter: drop-shadow(0 1px 4px #0001);
    transition: filter 0.18s, transform 0.14s;
}
.menu-icon-link:hover img,
.menu-icon-link:focus img {
    filter: drop-shadow(0 2px 8px #3a57fe50) brightness(1.13);
    transform: scale(1.10);
}
.menu-tooltip {
    visibility: hidden;
    opacity: 0;
    background: #222f;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 6px 16px;
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.99em;
    font-weight: 500;
    pointer-events: none;
    transition: opacity 0.18s, visibility 0.18s;
    z-index: 30;
    white-space: nowrap;
    box-shadow: 0 4px 24px #0005;
}
.menu-icon-link:hover .menu-tooltip,
.menu-icon-link:focus .menu-tooltip {
    visibility: visible;
    opacity: 1;
}

/* ==== MAIN ==== */
main {
    flex: 1 0 auto;
    padding: 2em;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
    min-height: 75vh;
}

/* ==== FOOTER ==== */
footer {
    background: #1a2133;
    color: #b0bad8;
    text-align: center;
    font-size: 1em;
    border-top: 1px solid #233;
    box-shadow: 0 -2px 8px #0003;
    padding: 1.1em 2em;
}

/* ==== NADPISY ==== */
h1, h2, .profile-heading {
    color: #3a57fe;
    font-weight: 800;
    margin-top: 0.6em;
    margin-bottom: 0.7em;
}

/* ==== FORM CARDS ==== */
.form-card, .login-form, .idea-form {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px #0001;
    padding: 2em 2em 1.2em 2em;
    margin: 32px auto 30px auto;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.form-card label, .login-form label, .idea-form label {
    font-weight: 600;
    color: #1a2133;
    font-size: 1em;
    margin-bottom: 3px;
}
.form-card input[type="text"], .form-card input[type="password"], .form-card input[type="date"],
.form-card input[type="email"], .form-card select,
.login-form input[type="text"], .login-form input[type="password"],
.idea-form textarea, .comment-form input[type="text"] {
    width: 100%;
    border: 1.5px solid #b6c4ff;
    border-radius: 9px;
    background: #f8f9fd;
    padding: 0.7em 1em;
    font-size: 1.07em;
    margin-bottom: 8px;
    outline: none;
    transition: border-color .15s;
}
.form-card input:focus, .form-card select:focus,
.login-form input:focus, .idea-form textarea:focus, .comment-form input:focus {
    border-color: #3a57fe;
}

/* ==== BUTTONS ==== */
button, .form-card button, .login-form button[type="submit"], .idea-form button, .comment-form button {
    padding: 0.7em 2em;
    border: none;
    border-radius: 24px;
    background: #3a57fe;
    color: #fff;
    font-weight: 700;
    font-size: 1.09em;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px #233fff10;
    cursor: pointer;
    transition: background .16s, color .13s, box-shadow .15s;
}
button:hover, .form-card button:hover, .login-form button[type="submit"]:hover, .idea-form button:hover, .comment-form button:hover {
    background: #25306a;
    color: #fff;
}

/* ---- Delete / Danger button ---- */
.bubble-delete, .delete-form button, .delete-form-btn {
    background: #d00 !important;
    color: #fff !important;
    font-size: 1.15em !important;
    font-weight: bold;
    padding: 0.15em 0.6em !important;
    border-radius: 7px !important;
    border: none;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.2s;
}
.bubble-delete:hover, .delete-form button:hover, .delete-form-btn:hover {
    background: #a00 !important;
}

/* ==== FEED (ŘEKA) ==== */
.river-stream {
    display: flex;
    flex-direction: column;
    gap: 2em;
    max-width: 600px;
    margin: 0 auto;
}
.river-bubble {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 #0002;
    padding: 1.1em 1.5em;
    border: 1px solid #ececec;
    position: relative;
    font-size: 1em;
    transition: box-shadow 0.2s;
}
.river-bubble.my-idea {
    border-left: 5px solid #3a57fe;
    background: #f5f8ff;
}
.bubble-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.7em;
}
.bubble-avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin-right: 1em;
    border: 2px solid #b6c4ff;
    object-fit: cover;
    background: #f6f9ff;
}
.bubble-author {
    font-weight: bold;
    color: #1a2133;
    margin-bottom: 0.3em;
    font-size: 1.05em;
}
.bubble-meta {
    display: block;
    font-size: 0.93em;
    color: #888;
    margin-top: 0.1em;
    margin-left: 3px;
}
.bubble-idea {
    font-size: 1.13em;
    margin-bottom: 0.9em;
}
.bubble-actions {
    display: flex;
    align-items: center;
}
.like-btn {
    background: none;
    border: none;
    color: #3a57fe;
    cursor: pointer;
    font-size: 1.15em;
    padding: 0.25em 1em;
    border-radius: 18px;
    transition: background 0.15s, color 0.16s;
    display: flex;
    align-items: center;
    gap: 0.3em;
}
.like-btn.liked {
    background: #b6c4ff33;
    color: #1a2133;
    font-weight: bold;
}
.like-count {
    min-width: 1.2em;
    display: inline-block;
    text-align: center;
}

/* ==== KOMENTÁŘE ==== */
.bubble-comments {
    margin-top: 1.1em;
    padding-top: 1em;
    border-top: 1px solid #e7e7e7;
    font-size: 1em;
}
.comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7em;
    margin-bottom: 0.7em;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #b6c4ff;
    object-fit: cover;
    background: #f3f4fa;
}
.comment-content {
    background: #f8fafc;
    border-radius: 13px;
    padding: 0.5em 1em;
    min-width: 0;
    flex: 1;
    font-size: 1em;
    position: relative;
    display: flex;
    flex-direction: column;
}
.comment-author {
    font-weight: bold;
    color: #1a2133;
    margin-bottom: 0.17em;
    font-size: 0.98em;
}
.comment-date {
    font-size: 0.88em;
    color: #999;
    margin-top: 0.18em;
    align-self: flex-end;
}
.comment-form {
    margin-top: 0.5em;
    display: flex;
    gap: 0.5em;
}
.comment-form input[type="text"] {
    flex: 1 1 0;
    border-radius: 16px;
    border: 1px solid #b6c4ff;
    padding: 0.7em 1.1em;
    font-size: 1em;
    background: #eef3fd;
}
.comment-form button {
    background: #3a57fe;
    color: #fff;
    font-weight: bold;
    padding: 0.6em 1.2em;
    border-radius: 24px;
    font-size: 1em;
}
.comment-form button:hover {
    background: #25306a;
}
.show-more-comments {
    display: inline-block;
    margin: 0.6em 0 0.2em 3em;
    color: #3a57fe;
    font-size: 0.99em;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.16s;
}
.show-more-comments:hover {
    color: #25306a;
    text-decoration: underline;
}

/* ==== AVATAR UŽIVATELE (profil) ==== */
.profile-avatar-img {
    width: 150px !important;
    height: 150px !important;
    border-radius: 15px;
    border: 2.5px solid #b6c4ff;
    background: #fafbff;
    object-fit: cover;
    box-shadow: 0 1.5px 6px #233fff12;
    margin-bottom: 8px;
}

/* ==== ERROR MESSAGES ==== */
.form-error, .msg-red {
    color: #d00;
    margin-top: 0.5em;
    font-size: 1em;
}
.msg-green {
    color: #28d830;
    font-weight: bold;
}

/* ==== RESPONSIVITY ==== */
@media (max-width: 900px) {
    .form-card, .idea-form, .river-bubble, .river-stream { max-width: 98vw; }
    .gallery-top-row, .gallery-bot-row { flex-direction: column; gap: 10px; align-items: stretch; }
    .gallery-del-form, .gallery-btn, .gallery-delete-btn { width: 100%; margin-left: 0; }
    header > div { flex-direction: column; gap: 18px; }
}
@media (max-width: 700px) {
    main { padding: 1em; }
    .bubble-avatar { width: 38px; height: 38px; }
    .profile-avatar-img { width: 105px !important; height: 105px !important; }
    .form-card, .idea-form { max-width: 97vw; }
    .menu-icons { gap: 16px; }
    header > div > a img { height: 32px; }
}
@media (max-width: 1100px) {
    .gallery-media-list { gap: 12px; }
    .gallery-media { width: 44vw; min-width: 140px; max-width: 210px; }
    .gallery-media img, .gallery-media video { width: 98%; min-width: 85px; max-width: 99%; height: 128px; }
}
@media (max-width: 750px) {
    .gallery-block, .upload-container { max-width: 99vw; }
    .gallery-media-list { gap: 8px; }
    .gallery-media { width: 96vw; min-width: 120px; }
}

/* ==== GALERIE ==== */
.gallery-block, .upload-container {
    background: #f8f9fd;
    border-radius: 16px;
    box-shadow: 0 2px 12px #0001;
    padding: 24px 24px 18px 24px;
    margin: 32px auto 34px auto;
    max-width: 950px;
    width: 100%;
    border: 1.5px solid #b6c4ff;
    box-sizing: border-box;
}
.gallery-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}
.gallery-title-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 0;
}
.gallery-title-form input[type="text"] {
    font-size: 1.09em;
    color: #232436;
    background: #f3f4fa;
    border: 1.2px solid #b6c4ff;
    border-radius: 7px;
    padding: 6px 12px;
    width: 230px;
    max-width: 86vw;
}
.gallery-btn {
    background: #3a57fe;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 7px;
    font-size: 1em;
    padding: 7px 22px;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.15s;
}
.gallery-btn:hover { background: #25306a; }
.gallery-del-form {
    display: flex;
    align-items: center;
}
.gallery-delete-btn {
    background: #d00;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 7px;
    font-size: 1.16em;
    padding: 13px 28px;
    cursor: pointer;
    margin-left: 12px;
    transition: background 0.16s;
}
.gallery-delete-btn:hover { background: #a00; }
.gallery-bot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 8px;
}
.gallery-checkbox-group {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 1em;
}
.gallery-empty {
    color: #aaa;
    margin: 16px 0 10px 0;
    font-size: 1em;
    text-align: center;
}
.gallery-media-list {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 20px;
}
.gallery-media {
    position: relative;
    width: 204px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #0001;
    padding: 9px 9px 17px 9px;
    text-align: center;
    border: 1px solid #e2eafe;
    transition: box-shadow 0.16s, border 0.13s;
}
.gallery-media:hover { 
    box-shadow: 0 4px 22px #3a57fe50; 
    border: 1.5px solid #3a57fe;
}
.gallery-media img,
.gallery-media video {
    width: 188px;
    height: 155px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #e6ebfa;
    cursor: pointer;
    transition: box-shadow 0.18s;
}
.gallery-media img:hover { box-shadow: 0 0 0 3px #3a57fe80; }
.media-meta {
    font-size: 93%;
    margin-top: 7px;
    color: #888;
    word-break: break-all;
}
.media-meta span { color: #aaa; }

/* ==== UPLOAD ==== */
.upload-dnd-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 160px;
    border: 2px dashed #b6c4ff;
    border-radius: 14px;
    background: #f9f9f9;
    margin-bottom: 18px;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.18s;
    padding: 9px 0 0 0;
    color: #232436;
    font-size: 1.08em;
    font-weight: 500;
    text-align: center;
}
.upload-dnd-box.dragover {
    border: 2px solid #3a57fe;
    background: #eef6ff;
    color: #3a57fe;
}
.upload-dnd-label {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.09em;
    color: #1a2133;
    text-align: center;
}
