/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Header */
.header {
    padding: 20px 0;
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.logo i {
    font-size: 32px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 80px;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.card p {
    color: #666;
    font-size: 1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 4px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.btn.btn-secondary:hover {
    background: #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.btn.btn-danger:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn.btn-icon {
    padding: 12px;
    min-width: 44px;
    justify-content: center;
}

.btn.btn-control {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn.btn-control.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.btn.btn-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn.btn-control.active:hover {
    background: rgba(255, 255, 255, 1);
}

/* Scheduled Meeting Info */
.scheduled-info {
    margin-top: 30px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.scheduled-info h3 {
    color: #28a745;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.meeting-details p {
    margin-bottom: 12px;
    font-weight: 500;
}

.link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.link-container input {
    flex: 1;
    font-size: 14px;
    padding: 8px 12px;
}

/* Call Screen */
#call-screen {
    background: #1a1a1a;
    color: white;
    position: relative;
}

.call-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meeting-info span:first-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.meeting-info span:last-child {
    font-size: 0.9rem;
    opacity: 0.7;
}

.call-actions {
    display: flex;
    gap: 12px;
}

/* Video Grid */
.video-container {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

.video-grid {
    display: grid;
    gap: 16px;
    height: 100%;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: minmax(200px, 1fr);
}

.video-item {
    position: relative;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.media-indicators {
    display: flex;
    gap: 8px;
}

.media-indicators i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
}

.media-indicators .muted {
    background: #ff4757;
    color: white;
}

.media-indicators .active {
    background: #2ed573;
    color: white;
}

/* Call Controls */
.call-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #333;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.chat-panel.active {
    right: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-message.own {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.chat-message.other {
    align-self: flex-start;
    background: #f1f3f4;
    color: #333;
}

.chat-message .sender {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.chat-message .content {
    line-height: 1.4;
}

.chat-message .timestamp {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input .btn {
    padding: 12px 16px;
    border-radius: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-panel {
        width: 100%;
        right: -100%;
    }
    
    .call-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .call-actions {
        order: -1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
       padding: 40px 0 60px;
   }
   
   .hero h1 {
       font-size: 2rem;
   }
   
   .card {
       padding: 30px 20px;
   }
   
   .card-icon {
       width: 60px;
       height: 60px;
       font-size: 24px;
   }
   
   .call-controls {
       gap: 15px;
       padding: 20px;
   }
   
   .btn.btn-control {
       width: 50px;
       height: 50px;
       font-size: 18px;
   }
}

/* Animations */
@keyframes fadeIn {
   from {
       opacity: 0;
       transform: translateY(20px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

.modal.active .modal-content {
   animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading {
   display: inline-block;
   width: 20px;
   height: 20px;
   border: 2px solid #f3f3f3;
   border-radius: 50%;
   border-top: 2px solid #667eea;
   animation: spin 1s linear infinite;
}

@keyframes spin {
   0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
   position: fixed;
   bottom: 20px;
   right: 20px;
   background: #333;
   color: white;
   padding: 16px 20px;
   border-radius: 8px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
   z-index: 1001;
   transform: translateX(400px);
   transition: transform 0.3s ease;
}

.toast.show {
   transform: translateX(0);
}

.toast.success {
   background: #28a745;
}

.toast.error {
   background: #dc3545;
}

/* Video placeholder */
.video-placeholder {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   height: 100%;
   background: linear-gradient(135deg, #667eea, #764ba2);
   color: white;
   font-size: 48px;
}

.no-video {
   background: #2a2a2a;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-direction: column;
   gap: 12px;
}

.no-video i {
   font-size: 48px;
   opacity: 0.5;
}

.no-video span {
   opacity: 0.7;
   font-size: 14px;
}