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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #eee;
    min-height: 100vh;
}

/* Landing Page */
.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing .container {
    max-width: 800px;
    text-align: center;
}

.landing h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 40px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    min-width: 200px;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #4CAF50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card p {
    color: #888;
    font-size: 0.9rem;
}

.sender-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.receiver-card:hover {
    border-color: #2196F3;
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.2);
}

.info-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    margin-bottom: 30px;
}

.info-section h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1rem;
}

.info-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: #aaa;
    line-height: 1.8;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

footer {
    color: #666;
    font-size: 0.85rem;
}

/* App Pages */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #4CAF50;
    font-size: 1.5rem;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.controls label {
    font-weight: 600;
    color: #aaa;
}

.controls input[type="text"] {
    padding: 12px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #2a2a4e;
    color: #fff;
    font-size: 16px;
    flex: 1;
    min-width: 120px;
}

.controls input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.controls button:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Settings Panel */
.settings-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.settings-panel h3 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.codec-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.codec-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.codec-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.codec-option label {
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.codec-option .supported {
    color: #4CAF50;
    font-weight: bold;
}

.codec-option .unsupported {
    color: #f44336;
}

.settings-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.settings-row label {
    color: #888;
    font-size: 14px;
}

.settings-row select {
    padding: 8px 12px;
    background: #1a1a2e;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.settings-row select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Status */
.status {
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.status.success {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.status.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.status.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

/* Codec Info */
.codec-info {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    margin-bottom: 15px;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Video Container */
.video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container video {
    width: 100%;
    display: block;
}

/* Peer Info */
.peer-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.peer-info .peer-id {
    font-family: monospace;
    font-size: 1.2rem;
    color: #4CAF50;
    font-weight: bold;
    letter-spacing: 2px;
}

.peer-info .peer-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

/* Links */
.info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.info a {
    color: #4CAF50;
    text-decoration: none;
}

.info a:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
    .landing h1 {
        font-size: 1.8rem;
    }

    .cards {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .controls {
        flex-direction: column;
    }

    .controls input[type="text"],
    .controls button {
        width: 100%;
    }

    .codec-options {
        flex-direction: column;
        gap: 10px;
    }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
