/* --- SpeedyShare Professional CSS (完全修正版) --- */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-main);
}

.container {
    max-width: 500px;
    width: 90%;
    background: var(--card-bg);
    margin: 40px 20px;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
    /* 絶対に高さを固定しない */
    height: auto; 
    display: flex;
    flex-direction: column;
}

/* タイトル周り */
.brand-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0;
}

.limit-badge {
    background: linear-gradient(45deg, #4f46e5, #06b6d4);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
}

/* アップロードエリア */
.drop-zone {
    border: 2px dashed #cbd5e0;
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    cursor: pointer;
    margin: 20px 0;
}

.file-list-preview {
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 15px;
}

/* 結果表示ボックス（ここが重なりの原因でした） */
.result-box {
    margin-top: 25px;
    padding: 20px;
    border: 2px solid var(--success);
    border-radius: 16px;
    background: #f0fff4;
    /* 縦に並べる設定 */
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.success-msg {
    color: #065f46;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

/* URL表示（はみ出し対策の決定版） */
#shareLink {
    width: 100%;
    /* inputではなくtextarea的に振る舞わせるため高さを自動に */
    min-height: 60px;
    padding: 12px;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    background: white;
    font-family: monospace;
    font-size: 13px;
    color: #334155;
    box-sizing: border-box;
    
    /* 強制折り返し */
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    
    /* リサイズ不可、枠線なし */
    resize: none;
    outline: none;
}

/* ボタン */
.upload-main-btn, .copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.copy-btn {
    background: var(--success);
}

/* トラストアイテム（文字かぶり防止） */
.trust-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    gap: 5px;
}

.trust-item i {
    font-size: 18px;
    color: var(--primary);
}

/* ダウンロード画面のボタン */
.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.mini-download-btn {
    background: #f1f5f9;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    /* 長いファイル名対策 */
    word-break: break-all;
    gap: 10px;
}

/* 広告スロット */
.ad-slot {
    margin-top: 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    min-height: 100px;
}

.site-footer {
    margin: 30px 0;
    font-size: 12px;
    color: var(--text-muted);
}