/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* ログイン画面 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #2980b9;
}

/* 管理画面 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-container h1 {
    color: #2c3e50;
    margin-bottom: 30px;
}

/* ナビゲーション */
nav {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a {
    color: #7f8c8d;
    text-decoration: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    background: #3498db;
    color: white;
}

/* フォーム */
.url-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.url-input {
    display: flex;
    align-items: center;
}

.url-input span {
    background: #ecf0f1;
    padding: 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    color: #7f8c8d;
}

.url-input input {
    border-radius: 0 5px 5px 0;
    flex: 1;
}

/* テーブル */
.stats-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.stats-table th {
    background: #34495e;
    color: white;
    font-weight: bold;
}

.stats-table tr:hover {
    background: #f8f9fa;
}

.stats-table .center {
    text-align: center;
}

.stats-table .truncate {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* メッセージ */
.message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* ボタン */
.btn-detail {
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-detail:hover {
    background: #2980b9;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    nav a {
        display: block;
        margin-bottom: 5px;
    }
    
    .stats-table {
        font-size: 14px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 10px;
    }
}

/* 削除ボタン */
.btn-delete {
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
    margin-left: 5px;
}

.btn-delete:hover {
    background: #c82333;
}

/* 操作ボタンの配置 */
.stats-table td:last-child {
    white-space: nowrap;
}