/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.description-container {
    text-align: center;
    margin-bottom: 30px;
}

.description-text {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    backdrop-filter: blur(10px);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.form-container, .content-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

#contentInput {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 20px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#contentInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.link-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

#shareUrl {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
}

.hidden {
    display: none !important;
}

.error-message {
    background: #dc3545;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.success-message {
    background: #28a745;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

#contentDisplay {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.6;
}

#contentDisplay.is-link {
    background: #e7f3ff;
    border-left-color: #007bff;
}

#contentDisplay a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

#contentDisplay a:hover {
    text-decoration: underline;
}

#qrcode {
    text-align: center;
    margin: 20px 0;
}

#qrcode canvas {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#viewsRemaining {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
        margin-bottom: 15px;
    }
    
    .description-text {
        padding: 15px;
        font-size: 14px;
    }
    
    .form-container, .content-container {
        padding: 20px;
    }
    
    .link-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-secondary {
        margin-left: 0;
        width: 100%;
    }
    
    #contentInput {
        height: 120px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .description-text {
        padding: 12px;
        font-size: 13px;
    }
    
    .form-container, .content-container {
        padding: 15px;
        margin: 10px;
    }
    
    .container {
        padding: 10px;
    }
}