/* 基本的なHTMLとbodyのスタイル */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* 共通の背景画像スタイル */
body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-repeat: repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

.widget,
.eye_catch,
footer {
    width: 100%;
}

/* デバッグ用のスタイル */
.eye_catch{
    background-color: transparent;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}
.eye_catch .widget {
    flex: 1 1 50%;
    text-align: center;
    min-width: 0; /* flexアイテムが縮小可能にする */
    width: 50%; /* 明示的に幅を指定 */
    box-sizing: border-box;
}
.eye_catch .widget img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.left_column{background-color: #fee;}
footer{background-color: #666;}

/* ページ全体を包む要素 */
.wrapper {
    flex: 1 0 auto;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    max-width: 1200px;
    width: 100%;
}

/* clearfix：フロートを使用する場合の高さ崩れを防ぐ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 左カラム */
.left_column {
    float: left;
    width: 200px;
    margin-right: 20px; /* カラム間の余白 */
    box-sizing: border-box;
}

/* 右カラム */
.right_column {
    float: left;
    width: calc(100% - 220px); /* 200px + 20px を引いて残りを使用 */
    box-sizing: border-box;
}

/* ---------------------------------------- */
/* レスポンシブ対応（メディアクエリ） */
/* ---------------------------------------- */

/* スマホ用（幅480px以下）: 1カラム表示 */
@media screen and (max-width: 480px) {
    /* カラムレイアウトの調整 */
    .left_column,
    .right_column {
        float: none;
        width: 100%;
        margin: 0;
    }

    /* Flexboxを使って要素の表示順を変更 */
    .wrapper {
        display: flex;
        flex-direction: column;
    }

    /* 右カラムを先(上)に、左カラムを後(下)に */
    .right_column {order: 1;}
    .left_column {order: 2;}
    
    /* アイキャッチのスマホ対応 */
    .eye_catch {
        flex-direction: row;
        gap: 0;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    .eye_catch .widget {
        flex: 1 1 50%;
        width: 50%;
        max-width: 50%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
}

/* タブレット用（幅768px以下）: レイアウト調整のみ */
@media screen and (max-width: 768px) {
    /* カラムレイアウトの調整 */
    .left_column,
    .right_column {
        float: none;
        width: 100%;
        margin: 0;
    }

    /* Flexboxを使って要素の表示順を変更 */
    .wrapper {
        display: flex;
        flex-direction: column;
    }

    /* 右カラムを先(上)に、左カラムを後(下)に */
    .right_column {order: 1;}
    .left_column {order: 2;}
}

/* 横向き表示への対応 */
@media only screen and (orientation: landscape) {
    /* メインの背景設定を無効化して疑似要素に任せる */
    body#caller,
    body#receiver,
    body#connection {
        background-image: none !important;
    }
}

/* iOS固有の修正 - Safari/iPhoneでの固定背景のバグに対応 */
@supports (-webkit-touch-callout: none) {
    /* メインの背景設定を無効化して疑似要素に任せる */
    body#caller,
    body#receiver,
    body#connection {
        background-image: none !important;
    }
}

/* ---------------------------------------- */
/* モーダルウィンドウの共通スタイル */
/* ---------------------------------------- */
/* モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #6a0dad, #4b0082);
    color: white;
    margin: 0 auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #ddd;
}

.call-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.btn-audio, .btn-video {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.btn-audio {
    background-color: #28a745;
    color: white;
}

.btn-video {
    background-color: #007bff;
    color: white;
}

.btn-audio:hover, .btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* モバイル対応 - 固定px余白で統一 */
@media screen and (max-width: 600px) {
    .modal-content {
        margin: 0 20px;
        width: calc(100% - 40px);
    }
}

/* タブレット対応 */
@media screen and (min-width: 601px) and (max-width: 768px) {
    .modal-content {
        width: 85%;
    }
}

footer {
    flex-shrink: 0;
}

/* ---------------------------------------- */
/* 更新成功メッセージの共通スタイル */
/* ---------------------------------------- */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #3a87ad;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    font-weight: bold;
    text-align: center;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.success-message.fade-out {
    opacity: 0;
}

/* ---------------------------------------- */
/* フッターのスタイル */
/* ---------------------------------------- */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0 10px;
    margin-top: 30px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
}

.footer-section p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #a7ccff;
    text-decoration: underline;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #555;
    font-size: 12px;
}

/* フッターのモバイル対応 */
@media screen and (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-section {
        min-width: 100%;
        padding: 0;
    }
} 