* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 20px;
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.video-column {
    flex: 0 0 900px;
    max-width: 900px;
}

.chat-column {
    flex: 1;
    min-width: 350px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.video-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
}

.video-container.active {
    display: flex;
    flex-direction: column;
}

.chat-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

}

.chat-wrapper {
    position: relative;
    width: 100%;
    height: 503px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideIn 0.2s ease-out;
    max-width: 85%;
}

.chat-message.own-message {
    align-self: flex-end;
}

.chat-message.other-message {
    align-self: flex-start;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.own-message .chat-message-header {
    flex-direction: row;
}

.other-message .chat-message-header {
    flex-direction: row;
}

.chat-message-username {
    font-weight: 600;
    font-size: 13px;
    color: #1a1a1a;
}

.chat-message-time {
    font-size: 11px;
    color: #888;
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    padding: 10px 14px;
    border-radius: 12px;
}

.own-message .chat-message-text {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.other-message .chat-message-text {
    background: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-message-delete {
    margin-left: auto;
    padding: 2px 6px;
    font-size: 11px;
    color: #999;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
}

.chat-message:hover .chat-message-delete {
    opacity: 1;
    visibility: visible;
}

.chat-message-delete:hover {
    color: #666;
}

.chat-message.deleted .chat-message-text {
    color: white !important;
    font-style: italic;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-send-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: auto;
}

.chat-send-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.chat-send-btn:active {
    transform: translateY(0);
}

.chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .video-column {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .chat-column {
        width: 100%;
        min-width: 0;
    }

    .chat-wrapper {
        height: 400px;
    }

    .chat-message {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .video-column {
        order: 1;
    }

    .chat-column {
        order: 2;
    }

    .chat-wrapper {
        height: 300px;
    }

    .chat-message {
        max-width: 95%;
    }

    .chat-container {
        padding: 15px;
    }

    .video-container {
        padding: 15px;
    }
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.error.active {
    display: block;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Fullscreen wrapper styling */
.video-wrapper:-webkit-full-screen {
    padding-bottom: 0;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
}

.video-wrapper:-moz-full-screen {
    padding-bottom: 0;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
}

.video-wrapper:fullscreen {
    padding-bottom: 0;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
    font-weight: 600;
}

.user-info img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.logout-btn {
    width: auto;
    padding: 8px 20px;
    background: #f44336;
    font-size: 14px;
}

.logout-btn:hover {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.watermark {
    position: absolute;
    bottom: 10%;
    right: 20px;
    transform: none;
    color: rgba(255, 255, 255, 0.15);
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    z-index: 2147483647;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    user-select: none;
}

/* Fullscreen watermark styles */
.video-wrapper:-webkit-full-screen .watermark {
    position: fixed;
    bottom: 10%;
    right: 20px;
    font-size: 36px;
    z-index: 2147483647;
}

.video-wrapper:-moz-full-screen .watermark {
    position: fixed;
    bottom: 10%;
    right: 20px;
    font-size: 36px;
    z-index: 2147483647;
}

.video-wrapper:fullscreen .watermark {
    position: fixed;
    bottom: 10%;
    right: 20px;
    font-size: 36px;
    z-index: 2147483647;
}

/* Custom fullscreen button - Vimeo play button style */
.custom-fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(23, 35, 34, 0.75);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.1s cubic-bezier(0.4, 0.0, 1, 1);
    pointer-events: auto;
    outline: none;
}

.custom-fullscreen-btn:hover {
    background: rgba(0, 173, 239, 0.9);
    color: #ffffff;
    transform: scale(1.06);
}

.custom-fullscreen-btn:active {
    transform: scale(0.95);
}

.video-wrapper:-webkit-full-screen .custom-fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.video-wrapper:-moz-full-screen .custom-fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.video-wrapper:fullscreen .custom-fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-password-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.success.active {
    display: block;
}

.back-to-login {
    text-align: center;
    margin-top: 16px;
}

.back-to-login a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-to-login a:hover {
    text-decoration: underline;
}

.help-link {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.help-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.help-link a:hover {
    text-decoration: underline;
}

.footer {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: #888;
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer {
        padding: 15px;
        margin-top: 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}
