/**
 * S3nt.me - Main Stylesheet
 */

/* 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;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Landing Page (Static) */
.container.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-static {
    text-align: center;
    color: white;
    padding: 60px 40px;
}

.logo-large {
    margin: 0 auto 30px;
    animation: fadeIn 0.8s ease-in;
}

.hero-static h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: 700;
    animation: fadeIn 1s ease-in;
}

.hero-static .tagline {
    font-size: 1.3em;
    margin-bottom: 5px;
    opacity: 0.95;
    animation: fadeIn 1.2s ease-in;
}

.hero-static .subtitle {
    font-size: 1em;
    margin-bottom: 40px;
    opacity: 0.85;
    font-weight: 300;
    animation: fadeIn 1.4s ease-in;
}

.hero-static .actions {
    margin: 40px 0;
    animation: fadeIn 1.6s ease-in;
}

.landing-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95em;
    animation: fadeIn 1.8s ease-in;
}

.landing-footer p {
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section (Legacy - keep for compatibility) */
.hero {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero .tagline {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Login Box */
.login-box {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.login-box h2 {
    color: #666;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.btn-primary {
    background: #667eea;
    color: white !important;
    text-decoration: none !important;
}

.btn-primary:hover {
    background: #5568d3;
    color: white !important;
    text-decoration: none !important;
}

/* Error/Success Messages */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

/* Logo */
.logo-nav {
    width: 40px;
    height: 40px;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link {
    display: inline-block;
    margin-right: 20px;
    line-height: 0;
}

.logo-link:hover .logo-nav {
    transform: scale(1.1);
}

/* Dashboard */
.dashboard {
    padding: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header-left {
    display: flex;
    align-items: center;
}

.dashboard-header h1 {
    color: #667eea;
    margin: 0;
}

.dashboard-header nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-header nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dashboard-header nav a.btn-primary {
    color: white !important;
}

.dashboard-header nav a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.dashboard-header nav a.btn-primary:hover {
    color: white !important;
    text-decoration: none !important;
}

.dashboard-header nav a svg {
    display: block;
    vertical-align: middle;
    transition: transform 0.2s ease, stroke 0.3s ease;
}

.dashboard-header nav a:hover svg {
    transform: scale(1.1);
}

.dashboard-header nav a[title="Settings"]:hover,
.dashboard-header nav a[title="Logout"]:hover {
    text-decoration: none;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    margin: 10px 0;
}

.stat-card small {
    opacity: 0.8;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.sort-info {
    color: #999;
    font-size: 0.9em;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table a {
    color: #667eea;
    text-decoration: none;
    margin-right: 10px;
}

.data-table a:hover {
    text-decoration: underline;
}

/* Sortable Table Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

.sortable-header:hover {
    background: #e8e8e8;
}

.sortable-header.sort-asc,
.sortable-header.sort-desc {
    background: #ddd;
}

.sort-arrow {
    font-size: 0.8em;
    margin-left: 5px;
    color: #667eea;
}

.stats-table {
    width: 100%;
    margin: 20px 0;
}

.stats-table th {
    text-align: right;
    padding: 10px 15px;
    color: #666;
    font-weight: 500;
}

.stats-table td {
    padding: 10px 15px;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.welcome-banner h2 {
    color: white;
    margin: 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-admin {
    background: #ff6b6b;
    color: white;
}

.badge-user {
    background: #4ecdc4;
    color: white;
}

.badge-success {
    background: #51cf66;
    color: white;
}

.badge-danger {
    background: #ff6b6b;
    color: white;
}

/* Features Grid */
.features {
    padding: 40px;
}

.features h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.feature p {
    color: #666;
}

/* API Docs */
.api-docs {
    padding: 40px;
    background: #f8f9fa;
}

.api-docs h2 {
    margin-bottom: 20px;
    color: #333;
}

.api-docs pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.api-docs code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

/* Stats Box */
.stats-box {
    padding: 40px;
}

.stats-box h1 {
    color: #667eea;
    margin-bottom: 30px;
}

.stats-box .actions {
    margin-top: 30px;
}

.share-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.share-links h3 {
    color: #333;
    margin-bottom: 15px;
}

/* Links */
.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #667eea;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* Actions */
.actions {
    margin-top: 20px;
}

.welcome .actions {
    margin-top: 25px;
}

.welcome p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state pre {
    text-align: left;
    background: #2d3748;
    color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: inline-block;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Settings Forms */
.settings-form {
    max-width: 600px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.inline-form {
    margin: 0;
}

.inline-form .form-group {
    margin-bottom: 10px;
}

.settings-form small {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.api-key-create {
    margin-bottom: 40px;
}

.api-keys-list {
    margin-top: 40px;
}

.api-keys-list h3 {
    margin-bottom: 20px;
}

/* Button Link Styles */
.btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger {
    color: #ff6b6b;
}

.btn-danger:hover {
    color: #ff5252;
}

.btn.btn-danger {
    background: #ff6b6b;
    color: white !important;
}

.btn.btn-danger:hover {
    background: #ff5252;
    color: white !important;
}

/* Code display */
code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* User Management */
.user-detail {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.user-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.user-action-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.user-action-card h3 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.1em;
}

.user-api-keys {
    margin-top: 40px;
    background: white;
    padding: 25px;
    border-radius: 8px;
}

.user-api-keys h3 {
    margin-bottom: 20px;
    color: #333;
}

select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* File Upload Interface */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-info {
    margin-bottom: 40px;
}

.upload-info h2 {
    color: #333;
    margin-bottom: 10px;
}

.upload-info p {
    color: #666;
    margin-bottom: 20px;
}

.allowed-types {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.allowed-types h3 {
    color: #667eea;
    font-size: 1em;
    margin-bottom: 10px;
}

.allowed-types ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.allowed-types li {
    color: #555;
    padding: 5px 0;
}

.allowed-types li:before {
    content: "✓ ";
    color: #51cf66;
    font-weight: bold;
    margin-right: 5px;
}

.upload-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.file-input-wrapper {
    margin-bottom: 30px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.file-input-label.drag-over {
    border-color: #667eea;
    background: #e8ebff;
    transform: scale(1.02);
}

.file-input-label svg {
    color: #667eea;
    margin-bottom: 20px;
}

.file-input-text {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.file-name-display {
    display: none;
    font-size: 1.1em;
    color: #667eea;
    font-weight: 600;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
}

.upload-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1em;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.upload-progress {
    margin-top: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1,
    .hero-static h1 {
        font-size: 2em;
    }

    .logo-large svg {
        width: 80px;
        height: 80px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-left {
        margin-bottom: 15px;
    }

    .dashboard-header nav {
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        max-width: 100%;
    }

    .sort-info {
        text-align: center;
    }

    .settings-form {
        padding: 20px;
    }

    .upload-form {
        padding: 20px;
    }

    .file-input-label {
        padding: 40px 20px;
    }

    .upload-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}
