/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

#app {
    max-width: 1200px;
    margin: 0 auto;
}

/* API Response Container */
.api-response {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Header Styles */
.api-header {
    background: linear-gradient(135deg, #ee1d52 0%, #25f4ee 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.api-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

/* Content Area */
.api-content {
    padding: 40px;
}

/* JSON Display */
.json-display {
    background: #2d3436;
    color: #dfe6e9;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Info Box */
.info-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid #ee1d52;
}

.info-box h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Endpoint Display */
.endpoint {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.endpoint code {
    background: #2d3436;
    color: #dfe6e9;
    padding: 12px 15px;
    border-radius: 8px;
    display: block;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    overflow-x: auto;
}

.method {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 10px;
}

.method.get {
    background: #61affe;
    color: white;
}

/* Test Area */
.test-area {
    background: #f1f8ff;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #ee1d52;
    color: white;
}

.btn-secondary:hover {
    background: #d01a48;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 29, 82, 0.4);
}

.btn-success {
    background: #25f4ee;
    color: #333;
}

.btn-success:hover {
    background: #1dd1cc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 244, 238, 0.4);
}

/* Result Display */
.result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    display: none;
}

.result h4 {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 30px;
    display: none;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Video Preview */
.video-preview {
    margin-top: 20px;
    text-align: center;
}

.video-preview video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Download Links */
.download-links {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.download-link {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    transition: transform 0.3s;
}

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

.download-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.download-link a:hover {
    text-decoration: underline;
}

/* API Status */
.api-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.status {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

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

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

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

/* API Documentation */
.api-docs {
    background: #fff3cd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 5px solid #ffc107;
}

.api-docs h4 {
    margin-bottom: 10px;
    color: #856404;
}

/* Documentation Page */
.docs-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-top: 20px;
}

/* Error Message */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border-left: 5px solid #e74c3c;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.error-message h3 {
    color: #c0392b;
    margin-bottom: 10px;
}

/* Success Message */
.success-message {
    background: rgba(46, 204, 113, 0.1);
    border-left: 5px solid #27ae60;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.success-message h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-content {
        padding: 20px;
    }
    
    .api-header h1 {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .download-links {
        grid-template-columns: 1fr;
    }
    
    .json-display {
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .api-header {
        padding: 20px;
    }
    
    .api-content {
        padding: 15px;
    }
    
    .info-box, .endpoint {
        padding: 15px;
    }
}