/* 共通ボタンスタイル */
.btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.2;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* フォームスタイル */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    text-align: left;
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group:last-child {
    text-align: center;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* 認証ページスタイル */
.auth {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    text-decoration: underline;
    color: #005a87;
}

/* レスポンシブヘッダー */
@media (max-width: 768px) {
    .app-name-full {
        display: none;
    }
    .app-name-short {
        display: inline;
    }

    .top-nav-title a {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
        display: inline-block;
    }

    .top-nav-links {
        font-size: 12px;
    }

    .top-nav-links a {
        padding: 5px 8px;
        margin-left: 5px;
    }
}

@media (max-width: 480px) {
    .top-nav-title a {
        font-size: 12px;
        max-width: 150px;
    }

    .top-nav-links {
        font-size: 11px;
    }

    .top-nav-links a {
        padding: 3px 6px;
        margin-left: 3px;
    }
}

@media (max-width: 360px) {
    .top-nav-title a {
        font-size: 11px;
        max-width: 120px;
    }

    .top-nav-links {
        font-size: 10px;
    }

    .top-nav-links a {
        padding: 2px 4px;
        margin-left: 2px;
    }
}

/* 写真グリッドスタイル */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.photo-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-thumbnail {
    text-align: center;
    margin-bottom: 15px;
}

.thumbnail-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.photo-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.photo-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-actions .button {
    padding: 5px 10px;
    font-size: 12px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 32px;
    line-height: 1.2;
}

.button.delete {
    background-color: #dc3545;
    color: white;
}

.button.delete:hover {
    background-color: #c82333;
}

/* アップロードセクション */
.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.upload-section h4 {
    margin-top: 0;
    color: #495057;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.preview-container {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
}

.preview-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#uploadButtonGroup {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ヘッダーセクション */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    text-align: right;
}

.logout-link {
    color: #dc3545;
    text-decoration: none;
    margin-left: 10px;
}

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

/* デバッグ情報 */
.debug-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.debug-info pre {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}
