/**
 * FileGate Styles
 * Modern, animated, secure file sharing platform
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --dark-bg: #1a202c;

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
    --light-bg: #f7fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-hover: rgba(255, 255, 255, 0.92);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.2);
}
/* ページラッパー */
.page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* メインコンテンツ */
.main-content {
    width: 100%;
}

/* Download layout grid keeps center CTA stable even if ads fail */
.dl-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(320px, 640px) minmax(140px, 1fr);
    grid-template-areas:
        "dl-left dl-top dl-right"
        "dl-left dl-center dl-right"
        "dl-left dl-bottom dl-right";
    gap: 20px;
    width: 100%;
    align-items: start;
}

.dl-slot {
    padding: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-slot-inner {
    width: 100%;
}

.dl-slot .adsbygoogle {
    width: 100%;
}

.dl-slot-top .dl-slot-inner,
.dl-slot-bottom .dl-slot-inner {
    max-width: 450px;
    margin: 0 auto;
}

.dl-slot-left {
    grid-area: dl-left;
}

.dl-slot-right {
    grid-area: dl-right;
}

.dl-slot-top {
    grid-area: dl-top;
}

.dl-slot-bottom {
    grid-area: dl-bottom;
}

.dl-slot-left,
.dl-slot-right {
    align-self: stretch;
}

.dl-slot-left .dl-slot-inner,
.dl-slot-right .dl-slot-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-center {
    grid-area: dl-center;
    display: flex;
    justify-content: center;
    width: 100%;
}

.dl-center > .form-container {
    width: 100%;
    max-width: 500px;
}

.dl-slot-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .dl-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .dl-slot-left,
    .dl-slot-right {
        display: none;
    }

    .dl-slot {
        min-height: 90px;
        width: 100%;
    }

    .dl-slot-inner {
        display: flex;
        justify-content: center;
        max-width: none;
    }

    .dl-slot-top .dl-slot-inner,
    .dl-slot-bottom .dl-slot-inner {
        max-width: none;
    }

    .dl-center {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .dl-center > .form-container {
        width: 100%;
        max-width: 450px;
    }
}
/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
    will-change: transform;
}

.circle-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Form Container */
.form-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.form-container:hover {
    background: var(--card-bg-hover);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px) translateZ(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #f7fafc;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group input::placeholder {
    color: #cbd5e0;
}

/* Checkbox Group */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Toggle Switch (for other uses) */
.toggle-group {
    margin: 20px 0;
}

.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #cbd5e0;
    border-radius: 13px;
    transition: background 0.3s ease;
    margin-right: 12px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

.toggle input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-label {
    color: var(--text-primary);
    font-size: 0.9rem;
    flex: 1;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px) scale(1.01);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #e53e3e;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.error-message,
.success-message,
.info-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.error-message {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.success-message {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.info-message {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Form Footer */
.form-footer {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* QR Code */
.qr-code-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-code-container img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
}

.qr-code-container p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.secret-code {
    margin: 10px 0;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 2px;
}

/* Dashboard Styles */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    min-height: 80px;
}

.dashboard-title h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-actions .btn {
    width: auto;
    min-width: 120px;
    padding: 12px 24px;
    white-space: nowrap;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    will-change: transform;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.stat-card-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Content Card */
.content-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.content-card:hover {
    box-shadow: var(--shadow-lg);
}

.content-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 600;
}

/* Table */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: white;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -30px;
    width: calc(100% + 60px);
    max-width: none;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    display: table;
}

thead {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
}

th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

th:first-child {
    padding-left: 30px;
}

th:last-child {
    padding-right: 30px;
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
}

td:first-child {
    padding-left: 30px;
}

td:last-child {
    padding-right: 30px;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge-warning {
    background: #feebc8;
    color: #7c2d12;
}

.badge-info {
    background: #bee3f8;
    color: #2c5282;
}

/* File Upload Area */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    background: rgba(247, 250, 252, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(237, 242, 247, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(230, 255, 250, 0.8);
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.2);
}

.upload-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--danger-color);
}

/* Desktop optimizations - Large screens */
@media (min-width: 1441px) {
    .dashboard-container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 40px;
    }
    
    .dashboard-header {
        padding: 32px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    
    .content-card {
        padding: 36px;
    }
    
    table th,
    table td {
        padding: 16px 24px;
    }
}

/* Desktop standard - Windows typical resolutions (1366x768, 1920x1080) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .dashboard-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .dashboard-header {
        padding: 28px;
    }
    
    .content-card {
        padding: 30px;
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .dashboard-container {
        padding: 20px;
    }
    
    .dashboard-header {
        gap: 20px;
    }
    
    .dashboard-actions {
        gap: 10px;
    }
    
    .dashboard-actions .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .content-card {
        padding: 24px;
    }
    
    table th,
    table td {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 30px 20px;
        max-width: 100%;
        margin: 10px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .dashboard-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .dashboard-actions .btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Table responsive */
    .table-container {
        margin: 0 -20px;
        padding: 0;
        border-radius: 0;
        overflow-x: scroll !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        max-width: none;
        width: calc(100% + 40px);
    }
    
    table {
        font-size: 0.8rem;
        min-width: 700px;
        display: table;
        table-layout: auto;
    }
    
    table th,
    table td {
        padding: 10px 12px;
        white-space: nowrap;
        font-size: 0.75rem;
    }
    
    table th:first-child,
    table td:first-child {
        padding-left: 20px;
    }
    
    table th:last-child,
    table td:last-child {
        padding-right: 20px;
    }
    
    /* Button adjustments */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Card spacing */
    .content-card {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    
    .content-card h2 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }
    
    /* Stat cards */
    .stat-card {
        padding: 20px;
    }
    
    .stat-card-value {
        font-size: 1.75rem;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Upload area */
    .upload-area {
        padding: 40px 20px;
        border-radius: 16px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-text {
        font-size: 1.05rem;
    }
    
    /* Additional mobile spacing */
    .card {
        padding: 15px;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        margin: 10px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .form-container {
        padding: 24px 16px;
        margin: 8px;
    }
    
    .form-header h1 {
        font-size: 1.75rem;
    }
    
    .form-header h2 {
        font-size: 1.25rem;
    }
    
    .dashboard-container {
        padding: 12px;
    }
    
    .dashboard-header {
        padding: 16px;
        min-height: auto;
    }
    
    .dashboard-title h1 {
        font-size: 1.5rem;
    }
    
    .content-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .content-card h2 {
        font-size: 1.125rem;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .upload-area {
        padding: 30px 16px;
    }
    
    table th,
    table td {
        padding: 6px;
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    /* Table for very small screens */
    .table-container {
        margin: 0 -16px;
        padding: 0;
        overflow-x: scroll !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        max-width: none;
        width: calc(100% + 32px);
    }
    
    table {
        font-size: 0.7rem;
        min-width: 600px;
        display: table;
        table-layout: auto;
    }
    
    table th,
    table td {
        padding: 10px 8px;
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    table th:first-child,
    table td:first-child {
        padding-left: 16px;
    }
    
    table th:last-child,
    table td:last-child {
        padding-right: 16px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card-value {
        font-size: 1.8rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Upload Section */
.upload-section {
    padding: 20px;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.file-input-wrapper .btn {
    width: auto;
    padding: 12px 24px;
}

/* Badge Styles */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 5px;
    display: inline-block;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Archive Preview Styles */
.archive-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.archive-loading .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.archive-preview {
    padding: 20px;
}

.archive-info {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.archive-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.archive-stats span {
    color: var(--text-secondary);
}

.archive-stats strong {
    color: var(--text-primary);
    margin-right: 5px;
}

.archive-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
}

.archive-table thead {
    background: var(--light-bg);
}

.archive-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.archive-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.archive-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.archive-table td {
    padding: 10px 15px;
}

.archive-directory {
    background: rgba(102, 126, 234, 0.03);
}

.archive-directory .archive-name {
    font-weight: 500;
}

.archive-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

.archive-name {
    color: var(--text-primary);
    word-break: break-all;
}

.archive-size {
    color: var(--text-secondary);
    white-space: nowrap;
}

.archive-type {
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Tree View Styles */
.archive-tree {
    font-family: 'Courier New', monospace;
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.archive-item {
    padding: 6px 10px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: default;
    display: flex;
    align-items: center;
}

.archive-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.archive-folder {
    font-weight: 500;
}

.archive-folder-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.archive-folder-toggle:hover {
    color: var(--primary-color);
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
    will-change: transform;
}

.toggle-icon-empty {
    display: inline-block;
    width: 20px;
}

.archive-children {
    display: block;
}

.archive-file-item {
    color: var(--text-primary);
}

.archive-size-inline {
    margin-left: auto;
    padding-left: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.archive-type-inline {
    padding-left: 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 80px;
    white-space: nowrap;
}

/* Responsive Archive Preview */
@media (max-width: 768px) {
    .archive-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .archive-table {
        font-size: 0.9rem;
    }
    
    .archive-table th,
    .archive-table td {
        padding: 8px 10px;
    }
    
    .archive-table thead th:nth-child(2),
    .archive-table tbody td:nth-child(2) {
        display: none;
    }
    
    .archive-size-inline,
    .archive-type-inline {
        display: none;
    }
}

/* Profile Management Styles */
.profile-info {
    background: rgba(102, 126, 234, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-group {
    margin-bottom: 15px;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-display {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.update-section {
    margin: 25px 0;
}

.update-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: 30px 0;
}

.text-secondary {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.mb-3 {
    margin-bottom: 15px;
}

.mt-3 {
    margin-top: 15px;
}

.hidden {
    display: none !important;
}

/* ========================================
   Advertisement Styles
   ======================================== */

/* 広告プレースホルダー（開発・テスト用） */
.ad-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px dashed #999;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 10px;
}


