/* TikTok Tools - Global Styles */
* {
    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: 0;
    margin: 0;
}

/* Add padding for main content */
.main-content {
    padding: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.container.wide {
    max-width: 1400px;
}

/* Typography */
h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h1.large {
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.2em;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-brand {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-brand:hover {
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    color: #555;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.nav-link.active {
    background: #667eea;
    color: white;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
        gap: 10px;
    }
    
    .nav-link {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

/* Color variants for different tools */
.form-section.account { border-left-color: #667eea; }
.form-section.video { border-left-color: #f093fb; }
.form-section.trend { border-left-color: #4facfe; }
.form-section.download { border-left-color: #ff6b6b; }
.form-section.comment { border-left-color: #a8edea; }
.form-section.follower { border-left-color: #764ba2; }

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Focus colors for different tools */
.account input:focus, .account select:focus, .account textarea:focus { border-color: #667eea; }
.video input:focus, .video select:focus, .video textarea:focus { border-color: #f093fb; }
.trend input:focus, .trend select:focus, .trend textarea:focus { border-color: #4facfe; }
.download input:focus, .download select:focus, .download textarea:focus { border-color: #ff6b6b; }
.comment input:focus, .comment select:focus, .comment textarea:focus { border-color: #a8edea; }
.follower input:focus, .follower select:focus, .follower textarea:focus { border-color: #764ba2; }

.input-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-right: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Button color variants */
.btn.account { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.btn.video { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.btn.trend { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.btn.download { background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%); }
.btn.comment { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #2c3e50; }
.btn.follower { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

/* Action Buttons */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    background: #34495e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.action-btn:hover {
    background: #2c3e50;
}

.action-btn.active {
    background: #667eea;
}

/* Action button color variants */
.account .action-btn.active { background: #667eea; }
.video .action-btn.active { background: #f093fb; }
.trend .action-btn.active { background: #4facfe; }
.download .action-btn.active { background: #ff6b6b; }
.comment .action-btn.active { background: #a8edea; color: #2c3e50; }
.follower .action-btn.active { background: #764ba2; }

/* Response Section */
.response-section {
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.response-section h3 {
    margin-bottom: 15px;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Loading color variants */
.account .loading, .account .spinner { color: #667eea; border-top-color: #667eea; }
.video .loading, .video .spinner { color: #f093fb; border-top-color: #f093fb; }
.trend .loading, .trend .spinner { color: #4facfe; border-top-color: #4facfe; }
.download .loading, .download .spinner { color: #ff6b6b; border-top-color: #ff6b6b; }
.comment .loading, .comment .spinner { color: #a8edea; border-top-color: #a8edea; }
.follower .loading, .follower .spinner { color: #764ba2; border-top-color: #764ba2; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkbox Groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

/* Special Layouts */
.dual-username {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Dashboard Specific Styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.tool-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.tool-card.account { border-left-color: #667eea; }
.tool-card.video { border-left-color: #f093fb; }
.tool-card.trend { border-left-color: #4facfe; }
.tool-card.download { border-left-color: #ff6b6b; }
.tool-card.comment { border-left-color: #a8edea; }
.tool-card.follower { border-left-color: #764ba2; }

.tool-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.tool-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

.tool-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tool-features {
    list-style: none;
    margin-bottom: 20px;
}

.tool-features li {
    padding: 5px 0;
    color: #555;
    font-size: 0.9em;
}

.tool-features li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
}

.tool-status {
    background: #ffc107;
    color: #856404;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.test-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    font-size: 16px;
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

/* Info Sections */
.info-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    border-left: 4px solid #17a2b8;
}

.info-title {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.info-text {
    color: #666;
    line-height: 1.6;
}

.api-endpoints {
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
}

.endpoint {
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .dual-username {
        grid-template-columns: 1fr;
    }
}

/* General Utilities */
.clearResponse {
    background: #e74c3c !important;
    margin-left: 10px;
}

.clearResponse:hover {
    background: #c0392b !important;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

/* Success States */
.success {
    background: #2ecc71;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Animation for loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation Enhancements */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: slideIn 0.5s ease-out;
}