body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    overflow-x: hidden;
}

/* Header */
.main-header {
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left img,
.header-right img {
    height: 80px;
    object-fit: contain;
}

.header-center {
    text-align: center;
    flex: 1;
}

.header-center h1 {
    margin: 0;
    color: #c62828;
    font-size: 44px;
}

.header-center p {
    margin-top: 8px;
    font-size: 18px;
    color: #333;
}

/* Moving red notice bar */
.top-bar {
    background: #c62828;
    color: white;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 18s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Mobile menu button */
.mobile-menu-bar {
    display: none;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 10px 12px;
}

.mobile-menu-btn {
    background: #c62828;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

/* Layout */
.layout-wrapper {
    width: 100%;
}

.main {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #ffffff;
    padding: 25px 20px;
    border-right: 1px solid #ddd;
    min-height: 100vh;
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar h3 {
    margin: 0;
    font-size: 28px;
}

.menu-toggle {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #333;
}

.menu-toggle:hover {
    color: #c62828;
}

.sidebar.collapsed {
    width: 60px;
    padding: 25px 10px;
}

.sidebar.collapsed h3,
.sidebar.collapsed ul {
    display: none;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    cursor: pointer;
}

.sidebar li:hover {
    background: #f3f3f3;
}

/* Content */
.content {
    flex: 1;
    padding: 35px;
    box-sizing: border-box;
    min-width: 0;
}

.content h2 {
    margin-top: 0;
    font-size: 34px;
    margin-bottom: 25px;
}

/* Form */
.predict-form {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.form-group {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
}

/* Remove number arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Button */
.button-row {
    margin-top: 20px;
    text-align: center;
}

.button-row button {
    background: #c62828;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.button-row button:hover {
    background: #a61f1f;
}

/* Result box */
.result-box {
    margin-top: 25px;
    padding: 18px;
    background: #e3f2fd;
    border-left: 5px solid #1976d2;
    border-radius: 6px;
    font-size: 18px;
    box-sizing: border-box;
}

/* Table */
.table-scroll {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background: #1976d2;
    color: white;
    position: sticky;
    top: 0;
}

/* Footer */
.pro-footer {
    background: #ffffff;
    border-top: 1px solid #ddd;
    margin-top: 50px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 40px 35px;
}

.footer-col h3 {
    margin: 0 0 10px;
    color: #c62828;
}

.footer-col h4 {
    margin-bottom: 12px;
}

.footer-col p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: #444;
    text-decoration: none;
    margin: 8px 0;
    font-size: 14px;
}

.footer-col a:hover {
    color: #c62828;
}

.footer-bottom {
    border-top: 1px solid #eee;
    padding: 18px;
    text-align: center;
    font-size: 14px;
    color: #666;
    background: #fafafa;
}

/* Tablet */
@media (max-width: 1100px) {
    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .content {
        width: 100%;
        padding: 20px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px 12px;
    }

    .header-left,
    .header-right {
        justify-content: center;
        width: 100%;
    }

    .header-left img,
    .header-right img {
        height: 56px;
    }

    .header-center h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .header-center p {
        font-size: 14px;
    }

    .top-bar {
        height: 44px;
        font-size: 14px;
    }

    .mobile-menu-bar {
        display: block;
    }

    .main {
        flex-direction: column;
    }

    .sidebar {
        display: none;
        width: 100%;
        min-height: auto;
        padding: 15px 12px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .sidebar.show-sidebar {
        display: block;
    }

    .sidebar h3 {
        font-size: 24px;
    }

    .content {
        width: 100%;
        padding: 12px;
    }

    .content h2 {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .predict-form {
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
    }

    .form-group {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        height: 44px;
        font-size: 14px;
    }

    .button-row button {
        width: 100%;
    }

    .result-box {
        font-size: 15px;
        padding: 14px;
    }

    .table-scroll {
        max-height: 320px;
    }

    table {
        min-width: 520px;
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding: 24px 16px;
        gap: 18px;
        text-align: center;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 14px;
        text-align: center;
    }
}


/* ===== SOCIAL ICONS ===== */
.social-icons {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #c62828;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background: #c62828;
    color: #ffffff;
}

/* ===== MOBILE MENU FIX ===== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        min-width: 110px;
    }

    .sidebar.show-sidebar {
        display: block;
        animation: slideDown 0.25s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}