* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Landing Page Styles */
.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.logo {
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
}

.logo i {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1rem;
    display: block;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.logo h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.go-live-btn {
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.go-live-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff5252, #e55100);
}

.go-live-btn i {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

.subtitle {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Streaming Interface Styles */
.streaming-interface {
    background: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.stream-header {
    background: #FFECD6;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    width: auto;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ff4757;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.earnings-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #2ed573;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 100px;
    justify-content: center;
}

.end-stream-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ff4757;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.end-stream-btn:hover {
    background: #ff3742;
    transform: translateY(-2px);
}

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16/9;
}

#webcam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.3) 100%);
}

.viewer-count {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.earnings-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2ed573;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

.earnings-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    animation: earningsAnimation 1s ease;
}

.chat-container {
    background: #16213e;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background: #0f3460;
    padding: 1rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    border-bottom: 2px solid #667eea;
}

.chat-count {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: auto;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 500px;
}

.chat-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    border-radius: 10px;
    animation: slideInMessage 0.3s ease;
    border-left: 3px solid #667eea;
}

.chat-message.tip {
    background: linear-gradient(45deg, rgba(46, 213, 115, 0.2), rgba(0, 184, 148, 0.2));
    border-left-color: #2ed573;
}

.chat-username {
    font-weight: bold;
    color: #667eea;
    margin-right: 0.5rem;
}

.chat-message.tip .chat-username {
    color: #2ed573;
}

.bottom-stats {
    background: #16213e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid #0f3460;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat i {
    color: #667eea;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #16213e;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-header i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body {
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    transform: translateY(-2px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

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

@keyframes earningsAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .stream-header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-between;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .go-live-btn {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
    
    .earnings-display, .end-stream-btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .bottom-stats {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .chat-container {
        order: -1;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .stream-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stream-header > * {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}
