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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.next-word {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.drawing-area {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 3px solid #f0f0f0;
}

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

.color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-btn {
    width: 35px;
    height: 35px;
    border: 3px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover, .color-btn.active {
    transform: scale(1.2);
    border-color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.size-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.size-slider {
    width: 100px;
}

.canvas-container {
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    margin-bottom: 20px;
}

#canvas {
    display: block;
    cursor: crosshair;
}

.form-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.word-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.word-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

.btn-secondary {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.3);
}

.posts-container {
    margin-top: 40px;
}

.post {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 2px solid #f5f5f5;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.post-word {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.post-image {
    text-align: center;
    margin: 15px 0;
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.htmx-indicator {
    display: none;
    text-align: center;
    padding: 10px;
    color: #667eea;
    font-weight: bold;
}

.htmx-request .htmx-indicator {
    display: block;
}

.error-message {
    background: #ff4757;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
}

.success-message {
    background: #2ed573;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .drawing-controls {
        justify-content: center;
    }
    
    .form-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .word-input {
        min-width: auto;
    }
}
