:root {
    /* Brand Colors */
    --brand-red: #db0829;
    --brand-red-hover: #ef3753;
    --brand-red-glow: rgba(219, 8, 41, 0.12);
    --brand-blue: #174266;
    --brand-blue-hover: #0f2c45;
    --brand-white: #ffffff;
    --brand-black: #404040;

    --primary-color: var(--brand-red);
    --secondary-color: var(--brand-blue);
    --text-color: #404040;
    --text-color-light: #475569;
    --text-color-muted: #94a3b8;
    --card-bg-color: #ffffff;
    --border-color: #f3f4f6;
    --input-bg-color: #ffffff;
    --success-color: #22c55e;
    --success-hover: #16a34a;
    --font-family-sans: 'Inter', sans-serif;
    --font-family-heading: 'Geologica', sans-serif;
}

body {
    font-family: var(--font-family-sans);
    background: linear-gradient(to top, rgba(23, 66, 102, 0.1) 0%, rgba(219, 8, 41, 0.1) 100%);
    color: var(--text-color);
    margin: 0;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

body.is-capturing .capture-ui {
    visibility: hidden;

}

.main-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    gap: 1.5rem 3rem;
    position: relative;
    left: 0;
    padding: 1rem;
    box-sizing: border-box;
    z-index: 2;
    top:-50px;
}

.side-image-left {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    position: relative;
    left: -150px;
    z-index: 10;
    top: 50px;
}

.side-image-right {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: 250%;
    max-width: 750px;
    box-sizing: border-box;
    position: relative;
    left: 60px;
    z-index: 5;
}

.side-image-left img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.side-image-right img {
    width: 200%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    position: relative;
    top: -90px;
}


.card-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1.5px solid rgba(219, 8, 41, 0.15);
    padding-bottom: 1.25rem;
}


.container {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
    top: -40px;
    left: 60px;
}

.container:hover {
    transform: translateY(-5px);
    border-color: rgba(219, 8, 41, 0.2);
    box-shadow: 0 25px 50px -12px rgba(23, 66, 102, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.02);
}

#totalCountContainer,
#sentCountContainer {
    display: none !important;
}

h1 {
    font-family: var(--font-family-heading);
    color: var(--secondary-color);
    margin: 0;
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
    font-weight: bolder;

}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-heading);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.form-group .icon {
    position: absolute;
    left: 14px;
    bottom: 13px;
    color: var(--text-color-light);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1.5px solid #e2e8f0;
    background-color: #ffffff;
    color: var(--brand-black);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-family: var(--font-family-sans);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

input:hover:not(:disabled) {
    border-color: #cbd5e1;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(219, 8, 41, 0.12), 0 4px 10px rgba(219, 8, 41, 0.05);
}

input:focus+.icon,
.form-group:focus-within .icon {
    color: var(--primary-color);
}

input::placeholder {
    color: var(--text-color-muted);
    opacity: 0.7;
}

input:disabled {
    background-color: rgba(241, 245, 249, 0.6);
    color: var(--text-color-light);
    border-color: #e2e8f0;
    cursor: not-allowed;
}

button {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-family-heading);
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(219, 8, 41, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 8px 24px rgba(219, 8, 41, 0.25);
    background: var(--brand-red-hover);
}

button:active:not(:disabled) {
    transform: translateY(0) scale(0.995);
    box-shadow: 0 2px 6px rgba(219, 8, 41, 0.15);
}

button:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.classroom-banner {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1.5px solid rgba(219, 8, 41, 0.25);
    text-align: center;
    animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
    0% {
        border-color: rgba(219, 8, 41, 0.15);
        box-shadow: 0 0 0 0 rgba(219, 8, 41, 0.03);
    }

    50% {
        border-color: rgba(219, 8, 41, 0.35);
        box-shadow: 0 0 12px 0 rgba(219, 8, 41, 0.1);
    }

    100% {
        border-color: rgba(219, 8, 41, 0.15);
        box-shadow: 0 0 0 0 rgba(219, 8, 41, 0.03);
    }
}

.classroom-text {
    margin: 0 0 0.8rem 0;
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 600;
}

.classroom-btn {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(23, 66, 102, 0.15);
    font-family: var(--font-family-heading);
}

.classroom-btn:hover {
    background-color: var(--brand-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(23, 66, 102, 0.25);
}

#status {
    margin-top: 2rem;
    background: #f3f4f6;
    padding: 1.25rem;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

#status>div {
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#status>div:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

#status>div p {
    margin: 0 0 0.35rem 0;
    font-size: 0.75rem;
    font-family: var(--font-family-heading);
    color: var(--text-color-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#status>div span {
    display: block;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-black);
    font-family: 'Courier New', Courier, monospace;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#overlayContent {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    border: 1px solid #f3f4f6;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    text-align: center;
    transform: scale(0.95);
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}

#overlayContent .icon {
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    display: inline-flex;
    justify-content: center;
    animation: pulse-icon 2s infinite ease-in-out;
}

@keyframes pulse-icon {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

#overlayContent p {
    margin: 0 0 1.75rem 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

#overlayContent strong {
    color: var(--primary-color);
    font-weight: 700;
}

#retryBtn {
    background: var(--success-color);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    border-radius: 8px;
    margin-top: 0;
}

#retryBtn:hover {
    background: var(--success-hover);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.25);
}

#gallery {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem !important;
    padding: 1rem;
    box-sizing: border-box;
}

.gallery-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item .info {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-color-light);
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item .info b {
    color: var(--primary-color);
}

@media (max-width: 1000px) {
    body {
        background: linear-gradient(to top, rgba(23, 66, 102, 0.1) 0%, rgba(219, 8, 41, 0.1) 100%) !important;
    }

    .main-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 1rem;
        justify-content: center;
        align-items: center;
        margin-left: 0;
        left: 0;
    }

    .container {
        max-width: 100%;
    }

    .side-image-left,
    .side-image-right {
        display: none;
    }
}