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

/* ============= LANDING PAGE STYLES ============= */
body.landing {
    background: linear-gradient(135deg, #1d1b1b 0%, #1b0d28 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    flex-direction: column;
}

.landing-container {
    min-height: 100vh;  
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 100px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-app-btn {
    background: white !important;
    color: #667eea !important;
    padding: 8px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
}

.nav-app-btn:hover {
    opacity: 0.9 !important;
}

.landing-content {
    max-width: 900px;
    text-align: center;
    color: white;
    z-index: 10;
}

.landing-content h1 {
    font-size: 3.5em;
    margin: 0;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.landing-content .tagline {
    font-size: 1.3em;
    margin-bottom: 15px;
    opacity: 0.95;
}

.landing-content .description {
    font-size: 1.1em;
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px auto;
    width: 100%;
    max-width: 900px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-item .icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.feature-item h3 {
    font-size: 1.1em;
    margin: 10px 0;
    font-weight: 600;
}

.feature-item p {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 30px;
}

.cta-btn {
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.demo-section {
    background: white;
    padding: 60px 20px;
    width: 100%;
}

.demo-content {
    max-width: 900px;
    margin: 0 auto;
}

.demo-content h2 {
    color: #333;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
}

.demo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    color: #333;
    font-size: 1.2em;
    margin: 15px 0;
}

.step p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 30px;
    width: 100%;
}

/* ============= APP STYLES ============= */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #402b53 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.status {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.status.waiting {
    background: #fff3cd;
    color: #856404;
}

.status.connected {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

.qr-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#qrcode {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.peer-info {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    word-break: break-all;
}

.clipboard-section {
    margin-top: 30px;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 15px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.history {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.history h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.history-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-text {
    flex: 1;
    word-break: break-word;
    margin-right: 10px;
}

.history-time {
    color: #999;
    font-size: 0.85em;
    white-space: nowrap;
}

.loading {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.instructions {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 10px;
    font-size: 0.9em;
    color: #004085;
}

.instructions ol {
    margin-left: 20px;
    margin-top: 10px;
}

.instructions li {
    margin-bottom: 5px;
}

/* AdSense Ad Containers */
.ad-container {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    min-height: 60px;
}

.ad-top {
    margin-top: 15px;
    margin-bottom: 20px;
}

.ad-bottom {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* PWA Download Section */
.pwa-download-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    text-align: center;
}

.pwa-download-section h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: white;
}

.pwa-download-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 0.95em;
}

.download-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.download-btn {
    background: white !important;
    color: #667eea !important;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
}

/* Mobile Styles */
body.mobile {
    padding: 20px;
    color: white;
    
}

.container.mobile {
    max-width: 500px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.header.mobile {
    padding-top: 20px;
}

.header.mobile h1 {
    font-size: 2rem;
    color: white;
}

.header.mobile p {
    opacity: 0.9;
    font-size: 0.95rem;
    color: white;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.status.scanning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.status.connecting {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.status.connected {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.status.error {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

#scanner {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background: #f8f9fa;
}

#reader {
    border: none !important;
}

.scanner-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:active {
    transform: scale(0.95);
}

.btn-primary:active {
    transform: scale(0.95);
}

.connected-section {
    display: none;
}

.connected-section.active {
    display: block;
}

.clipboard-display {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    color: #333;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    word-wrap: break-word;
}

.clipboard-display.empty {
    color: #999;
    text-align: center;
    font-style: italic;
}

.send-section {
    margin-top: 20px;
}

.send-section label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.notification-prompt {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #333;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.notification-prompt button {
    margin-top: 10px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.history h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

.history-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #666;
}

.history-item .time {
    color: #999;
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse-mobile {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.copy-notification.show {
    opacity: 1;
}

/* Responsive */
body {
    -webkit-tap-highlight-color: transparent;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ============= RESPONSIVE STYLES ============= */
@media (max-width: 1024px) {
    .navbar {
        padding: 12px 20px;
    }

    .landing-content h1 {
        font-size: 3em;
    }

    .landing-content .tagline {
        font-size: 1.2em;
    }

    .demo-content h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .logo {
        width: 100%;
        margin-bottom: 10px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-around;
    }

    .nav-links a {
        font-size: 0.9em;
    }

    .landing-container {
        padding-top: 140px;
    }

    .landing-content h1 {
        font-size: 2.5em;
    }

    .landing-content .tagline {
        font-size: 1.1em;
    }

    .landing-content .description {
        font-size: 1em;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-item {
        padding: 20px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cta-btn {
        width: 100%;
        padding: 12px 30px;
    }

    .demo-content h2 {
        font-size: 1.8em;
    }

    .demo-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .step h3 {
        font-size: 1em;
    }

    .step p {
        font-size: 0.9em;
    }

    .demo-section {
        padding: 40px 15px;
    }

    .footer {
        padding: 20px 15px;
        font-size: 0.9em;
    }

    .footer p {
        margin: 5px 0;
    }

    /* App Styles for Mobile */
    .container {
        max-width: 100%;
        padding: 20px;
        border-radius: 0;
    }

    .header {
        margin-bottom: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .landing-content h1 {
        font-size: 2em;
    }

    .landing-content .tagline {
        font-size: 1em;
    }

    .landing-content .description {
        font-size: 0.95em;
    }

    .feature-item {
        padding: 15px;
    }

    .feature-item .icon {
        font-size: 2em;
    }

    .feature-item h3 {
        font-size: 1em;
    }

    .feature-item p {
        font-size: 0.85em;
    }

    .cta-btn {
        padding: 12px 20px;
        font-size: 1em;
    }

    .demo-content h2 {
        font-size: 1.5em;
        margin-bottom: 25px;
    }

    .step h3 {
        font-size: 0.95em;
    }

    .step p {
        font-size: 0.85em;
    }

    .footer {
        font-size: 0.85em;
    }

    /* App Styles for Small Screens */
    .container {
        padding: 15px;
    }

    textarea {
        min-height: 120px;
    }

    .btn {
        padding: 12px;
        font-size: 1em;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-time {
        margin-top: 8px;
    }
}
