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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

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

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 100;
    text-align: center;
}

h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #2196F3, #00BCD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 0.9rem;
    color: #aaa;
}

.screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: relative;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
#welcome-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, #1a237e 0%, #000 100%);
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero-visual {
    position: relative;
    height: 200px;
    margin-bottom: 40px;
}

.floating-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    animation: float 6s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.floating-text:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    color: #00BCD4;
}

.floating-text:nth-child(2) {
    top: 50%;
    right: 25%;
    animation-delay: 2s;
    color: #FF4081;
}

.floating-text:nth-child(3) {
    bottom: 20%;
    left: 35%;
    animation-delay: 4s;
    color: #FFC107;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #2196F3, #00BCD4, #00E5FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 30px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 800px;
    width: 100%;
}

.feature {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

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

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #00BCD4;
}

.feature p {
    color: #aaa;
}

/* Camera Screen */
.camera-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

#camera-view {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#ar-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.camera-overlay {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-info {
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-counter {
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Write Screen */
.write-container {
    padding: 80px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.write-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #00BCD4;
}

#draw-canvas {
    background: #111;
    border: 2px solid #333;
    border-radius: 15px;
    width: 100%;
    height: 400px;
    cursor: crosshair;
    touch-action: none;
}

.draw-tools {
    margin: 20px 0;
}

.tool-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.tool-btn {
    background: #222;
    border: 2px solid #444;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn.active {
    background: #2196F3;
    border-color: #2196F3;
}

.color-palette {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn.active {
    border-color: #fff;
    transform: scale(1.2);
}

.slider {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.message-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 20px 0;
}

.message-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.message-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.message-options input[type="number"] {
    width: 60px;
    padding: 5px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: auto;
}

/* Messages Screen */
.messages-container {
    padding: 80px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.messages-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #00BCD4;
}

.messages-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    background: #222;
    border: 1px solid #444;
    padding: 8px 20px;
    border-radius: 20px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #2196F3;
    border-color: #2196F3;
    color: #fff;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.message-item {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.message-author {
    font-weight: bold;
    color: #00BCD4;
}

.message-time {
    font-size: 0.9rem;
    color: #666;
}

.message-content {
    width: 100%;
    height: 150px;
    background: #000;
    border-radius: 10px;
    margin-bottom: 10px;
}

.message-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, #2196F3, #00BCD4);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(33,150,243,0.4);
}

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

.btn-secondary:hover {
    background: #444;
}

.btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.btn-circle.btn-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #2196F3, #00BCD4);
    border: none;
}

.btn-circle .icon {
    font-size: 1.5rem;
}

.btn-circle.btn-large .icon {
    font-size: 2rem;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-selector select {
    background: rgba(0,0,0,0.6);
    border: 1px solid #444;
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .message-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        bottom: 20px;
    }
}