html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}


body {
    background-color: #f8f9fa;
    margin-bottom: 60px;
}

/* コンテナの幅設定 - レスポンシブ対応 */
.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* PC画面での最大幅設定 */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ヘッダーのカスタムスタイル */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .navbar {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0.75rem 0;
}

header .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

header .navbar-brand:hover {
    transform: scale(1.05);
}

header .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

header .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* ログインユーザー名の表示 */
header .nav-link.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
    cursor: default;
}

header .nav-link.text-muted:hover {
    background-color: transparent;
    transform: none;
}

/* PCでメニューが改行されないように */
@media (min-width: 768px) {
    header .navbar-nav {
        flex-wrap: nowrap;
    }
    
    header .navbar-collapse {
        flex-wrap: nowrap;
    }
}

/* ハンバーガーメニューのスタイル */
header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
}

header .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* フッターのスタイル改善 */
.footer {
    background-color: #ffffff;
    padding: 1.5rem 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* メインコンテンツエリア */
.main-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    min-height: calc(100vh - 200px);
}

@media (max-width: 991px) {
    .main-content {
        padding: 1.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* サイドバー広告エリア（PCのみ） */
.sidebar-ad {
    padding-top: 2rem;
    padding-left: 1rem;
}

.ad-container {
    position: relative;
}

.ad-placeholder {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.ad-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 広告スペース（サンプル表示） */
.ad-space {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.ad-space.ad-300x250 {
    width: 300px;
    height: 250px;
    max-width: 100%;
}

.ad-space.ad-300x600 {
    width: 300px;
    height: 600px;
    max-width: 100%;
}

.ad-demo-text {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* スティッキー広告 */
.sticky-ad {
    position: sticky;
    top: 2rem;
}

/* 広告エリアのレスポンシブ調整 */
@media (min-width: 992px) and (max-width: 1199px) {
    .sidebar-ad {
        padding-left: 0.5rem;
    }
    
    .ad-space.ad-300x250,
    .ad-space.ad-300x600 {
        width: 100%;
        max-width: 250px;
    }
    
    .ad-space.ad-300x600 {
        height: 500px;
    }
}

/* コンテナの調整 */
.container-fluid {
    max-width: 1920px;
    margin: 0 auto;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* PC表示時のメインコンテンツとサイドバーの間隔調整 */
@media (min-width: 992px) {
    .main-content {
        padding-right: 2rem;
    }
}

#cropOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.corner-handle {
    width: 16px;
    height: 16px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    cursor: move;
    z-index: 10;
}

#tl {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}

#tr {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}

#bl {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}

#br {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}

