* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.content-wrapper {
    width: 100%;
    max-width: 600px;
    opacity: 0;
    animation: fadeIn 0.8s forwards;
}

.text-center { text-align: center; }

@keyframes fadeIn {
    to { opacity: 1; }
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.session-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.subtitle, .status-message {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 2.5rem;
}

.btn {
    background-color: #FFFFFF;
    color: #000000;
    border: 2px solid #FFFFFF;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    background-color: #000000;
    color: #FFFFFF;
}

.code-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    margin: 1.5rem 0;
    padding: 1rem;
    border: 2px solid #555;
    background-color: #1a1a1a;
    letter-spacing: 4px;
}

.qr-code {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #FFFFFF;
    display: inline-block;
}

.qr-code img {
    max-width: 250px;
    height: auto;
    display: block;
}

.file-progress-wrapper {
    margin: 3rem auto;
    width: 100%;
}

.progress-bar-outer {
    width: 100%;
    height: 30px;
    border: 2px solid #FFFFFF;
    background-color: #1a1a1a;
    padding: 4px;
    position: relative;
    overflow: hidden;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: #FFFFFF;
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.filename-display, .filename-final {
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 1.5rem;
    word-break: break-all;
}

/* --- START OF FIXES --- */

/* NEW: Replaced old icon style with container for SVG */
.icon-container {
    margin: 2rem 0;
}

/* NEW: Styles for the animated SVG success icon */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #ffffff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #ffffff;
    animation: scale .3s ease-in-out .9s both;
    margin: 0 auto;
}

.success-icon__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #ffffff;
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-icon__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

/* FIX: Correctly center the footer and push it to the bottom */
footer {
    width: 100%; /* Ensure it spans the full width */
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #555;
    margin-top: auto; /* Push to the bottom of the flex container */
}
/* --- END OF FIXES --- */


.expiry-message, .error-message {
    font-size: 0.9rem;
    color: #888;
    margin-top: 2rem;
}

.error-message { color: #ff6b6b; }

.file-input { display: none; }

.top-bar {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
}

.language-selector a {
    color: #888;
    text-decoration: none;
    font-size: 1rem;
    margin: 0 0.25rem;
    transition: color 0.2s ease;
}

.language-selector a.active,
.language-selector a:hover {
    color: #FFFFFF;
}

/* --- NEW STYLES for Homepage Form and Flash Messages --- */

/* Action Wrapper on Homepage */
.action-wrapper {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.separator {
    color: #555;
    font-weight: 600;
}

.join-session-form .join-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.code-input {
    background-color: #1a1a1a;
    border: 2px solid #555;
    color: #FFFFFF;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    width: 200px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: border-color 0.2s ease;
}

.code-input::placeholder {
    color: #666;
    letter-spacing: normal;
    text-transform: none;
}

.code-input:focus {
    outline: none;
    border-color: #FFFFFF;
}

/* Flash Messages */
.flash-message-container {
    position: absolute;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.flash-message {
    background-color: #ff6b6b;
    color: #000000;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Secondary Button Style */
.btn.btn-secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #555;
}

.btn.btn-secondary:hover {
    background-color: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
}


@media (max-width: 768px) {
    .main-title { font-size: 2.5rem; }
    .session-title { font-size: 2rem; }
    .code-display { font-size: 1.5rem; }
    .qr-code img { max-width: 200px; }
}

