@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #FFC72C;
    --color-red: #fca5a5;

    --bg-dark: #0b0b0d;
    --bg-dark2: #1f1f23;
    --bg-dark3: #2c2c30;

    --secondary-color: #F4D35E; 
    --accent-color: #FFB84D;
    --bg-card: #222226;
    --border-color: rgba(255,199,44,0.12);
    --text-color: #EDF2F7;
}

.navbar {
    color: var(--secondary-color);
    background-color: var(--bg-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-text {
    color: var(--secondary-color) !important;
    transition: transform 0.3s ease;
}

.navbar,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link {
    width: max-content;
}

.navbar-brand {
    font-weight: 700;
}

.nav-link:hover {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}


body {
    background: linear-gradient(120deg, var(--bg-dark) 0%, var(--bg-dark2) 100%);
    font-family: "Roboto", sans-serif;
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.container-main {
    width: 100vw;
    padding: 3rem;
    flex: 1;
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.header-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 30%, var(--secondary-color) 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-section p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.category-section {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 100%;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.book-card-admin {
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-book-actions {
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 77, 0.05), transparent);
    transition: 0.5s ease;
}

.book-card:hover::before {
    left: 100%;
}

.book-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px var(--border-color);
    transform: translateY(-6px);
}

.book-checkbox {
    width: 1.3rem;
    height: 1.3rem;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.book-info {
    margin-left: 2.3rem;
}

.book-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}


/* pro administrátorské karty ve správě aplikace */

.color-red {
    color: var(--color-red);
}

.book-card.color-red {
    border-color:var(--color-red);
}

.book-card.color-red:hover {
    border-color: var(--color-red);
    box-shadow: 0 8px 16px rgba(252, 165, 165, 0.2);
}

/*--------------*/

.book-author {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.book-genre {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.genre-1 {
    background: #3b82f6;
}

.genre-2 {
    background: #f50b80;
}

.genre-3 {
    background: #2bb52f;
}

.selection-summary {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    position: sticky;
    top: 1rem;
}

.summary-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    color: #cbd5e1;
}

.summary-item:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-valid {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.status-invalid {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-red);
}

.buttons-section {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-custom {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.custom-hr {
    border-color: var(--border-color);
    margin: 3rem 0;
}

.custom-hr-dropdown {
    border-color: var(--border-color);
}

.dropdown-item-text-custom {
    color: var(--text-color);
    font-weight: bold;
}

.custom-dropdown-item {
    color: var(--text-color);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--bg-dark3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(241, 217, 99, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-reset {
    background: var(--border-color);
    color: white;
}

.btn-reset:hover {
    background: #696647;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #ff0000;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #22c55e;
}

.genre-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stat-box {
    text-align: center;
    background: rgba(99, 102, 241, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

    .dropdown-menu-custom {
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
    }

    @media (max-width: 768px) {
        .header-section h1 {
            font-size: 1.8rem;
        }

        .books-grid {
            grid-template-columns: 1fr;
        }

        .selection-summary {
            position: static;
        }

        .category-title {
            font-size: 1.1rem;
        }
    }

    /* ========================================
       LOGIN PAGE STYLES
       ======================================== */

    .login-section {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 0;
    }

    .login-card {
        background: var(--bg-card);
        border: 2px solid var(--border-color);
        border-radius: 16px;
        padding: 3rem 2.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        position: relative;
        overflow: hidden;
        animation: fadeInUp 0.6s ease-out;
    }

    .login-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 199, 44, 0.05) 0%, transparent 70%);
        animation: pulse 6s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { transform: scale(1); opacity: 0.3; }
        50% { transform: scale(1.1); opacity: 0.6; }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-card-body {
        position: relative;
        z-index: 1;
    }

    .login-header {
        text-align: center;
        margin-bottom: 2.5rem;
    }

    .login-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, var(--primary-color) 30%, var(--secondary-color) 70%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .login-subtitle {
        color: var(--text-color);
        opacity: 0.8;
        font-size: 1rem;
    }

    /* Form Styles */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-label {
        display: block;
        color: var(--text-color);
        font-weight: 500;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .form-input {
        width: 100%;
        padding: 0.85rem 1.2rem;
        background: var(--bg-dark2);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-color);
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .form-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.1);
        background: var(--bg-dark);
    }

    .form-user-input {
        width: 100%;
        padding: 0.85rem 1.2rem;
        background: var(--bg-dark2);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-color);
        font-size: 1rem;
        transition: all 0.3s ease;
        margin-bottom: 1rem;

    }

    .form-input::placeholder {
        color: #64748b;
    }

    .form-footer {
        text-align: right;
        margin-bottom: 2rem;
    }

    .forgot-link {
        color: var(--secondary-color);
        font-size: 0.9rem;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .forgot-link:hover {
        color: var(--primary-color);
        text-decoration: underline;
    }

    /* Login Button - stejný styl jako submit button v hlavní aplikaci */
    .btn-login {
        width: 100%;
        padding: 1rem 2rem;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        color: var(--bg-dark3);
        border: none;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 199, 44, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login i {
        transition: transform 0.3s ease;
    }

    .btn-login:hover i {
        transform: translateX(5px);
    }

    .indentation-from-sides {
        margin-left: 10vw;
        margin-right: 10vw;
    }

    /* Register Section */
    .register-section {
        text-align: center;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid var(--border-color);
    }

    .register-section p {
        color: var(--text-color);
        opacity: 0.8;
    }

    .register-link {
        color: var(--primary-color);
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .register-link:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }

    .custom-dropdown-item:hover {
        background-color: var(--bg-dark2) !important;
        color: var(--primary-color) !important;
    }

    .search-input {
        margin-top: 2rem;
    }

    .login-error-text {
        color: #fca5a5;
        text-align: center;
        margin-top: 1rem;
    }

    .section-title {
        color: var(--primary-color);
        margin-bottom: 1.5rem;
    }

    .section-title-red {
        color: var(--color-red);
    }

    .primary-icon {
        color: var(--secondary-color);
    }

    .form-card {
        background: var(--bg-dark2);
        padding: 2.5rem;
        border-radius: 1rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        border: 1px solid var(--accent-color);
    }

    /* Responsive */
    @media (max-width: 768px) {
        .login-card {
            padding: 2rem 1.5rem;
        }

        .login-title {
            font-size: 1.6rem;
        }

        .btn-login {
            font-size: 1rem;
            padding: 0.85rem 1.5rem;
        }
    }

    .counts {
        white-space: nowrap;
    }

footer {
    background-color: var(--bg-dark3);
    color: #ecf0f1;
    text-align: center;
    padding: 20px;
    font-family: sans-serif;
    margin-top: 40px;
}

footer p {
    margin: 0;
    font-size: 14px;
}

.form-card-red {
    border-color: var(--color-red);
}
.text-light-muted {
    color: var(--text-color);
    opacity: 0.8;
}

.record-author {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.record-author i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.info-text {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 2rem;
    font-size: medium;
}