html,body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: "meiryo", sans-serif;
    font-weight: 400;
    font-style: normal;
}
body {
    padding-top: 98px;
}

/* ログイン画面のスタイル */
#login-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-container {
    text-align: center;
    color: #fff;
    padding: 2em;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
}

.login-container h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
}

.login-container p {
    margin: 1em 0;
    font-size: 1.2em;
}

.login-note {
    font-size: 0.9em !important;
    color: #aaa;
    margin-top: 1em;
}

.success-message {
    color: #4CAF50;
    font-size: 1.3em !important;
    font-weight: bold;
}

/* メール入力フィールド */
#email-input {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1em;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.9);
}

#email-input:focus {
    outline: none;
    border-color: #1DA1F2;
    background-color: #fff;
}

/* メール入力フィールド */
#otp-input {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1em;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.9);
}

#otp-input:focus {
    outline: none;
    border-color: #1DA1F2;
    background-color: #fff;
}

/* ログインボタン */
.auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background-color: #1DA1F2;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #1a8cd8;
}

.auth-btn:active {
    background-color: #1580c5;
}

/* メインコンテンツ */
#main-content {
    display: none;
}

header {
	position: fixed;
	padding: 0.5em 0;
	width: calc(100% - 2em);
	color: #fff;
	background-color: #000;
	z-index: 5;
	transition: transform .3s;
	top: 0;
    text-align: center;
    padding-left: 1em;
    padding-right: 1em;
    padding-bottom: 0;
}
.header-top {
    width: 100%;
    height: 40px;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hleft {
    width: calc(25% - 1em);
}
.hright {
    width: calc(25% - 1em);
    height: 36px;
    display: flex;
    align-items: center;
}
.signout-btn {
    background-color: #606060;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    width: 30px;
    height: 30px;

    margin: 0 0 0 5px;
    display: flex;
    align-items: center;
}
.signout-btn img {
    width: 80%;
    height: 80%;
    margin: 0 auto;
}
.myicon {
    height: 36px;
    display: flex;
    align-items: center;
    margin-left: auto;

}
.myicon img {
    width: 35px;
    height: 35px;

}

.signout-btn:hover {
    background-color: #b2b2b2;
}

h1 {
    margin: 0 auto;
    font-size: 1.5em;
    text-align: center;
    width: 50%;
}

.header-bottom {
    width: 100%;
    height: 50px;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}
.header-bottom span {
    margin: 0;
    font-size: 1em;
}
.toukou {
    width: 50%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
    position: relative;
}
.likes {
    width: 50%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
    position: relative;
}
.toukou span,
.likes span {
    position: relative;
    padding-bottom: 10px;
}
.toukou.active span::after,
.likes.active span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10px;
    right: -10px;
    height: 4px;
    background-color: rgb(92, 153, 230);
    border-radius: 2px;
}
.tweet {
    display: block;
    margin: 0;
    width: 100%;
    height: 200px;
    background-color: rgb(255, 255, 255);
}
.tweetbox {
    display: flex;
    margin: 0;

    width: 100%;

    background-color: rgb(255, 255, 255);
    border: 0px solid;
    border-bottom-width: 1px;
    border-bottom-color: rgb(239, 243, 244);
}
.tweeticon {
    width: 50px;
    height: 50px;
    margin: 10px;
}
.tweetright {
    display: block;
    margin: 10px;
    margin-left: 0px;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.rtop {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.timestamp {
    font-size: 12px;
    color: gray;
    margin: 0;
}
.rbottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 33px;
}
.content {
    margin: 0;
    margin-top: 3px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    flex: 1;
    max-width: calc(100% - 50px);
}
.iine{
    margin:  auto 10px;
    position:relative;
    margin-top: 0;
    cursor: pointer;
}
.iine-icon {
    font-size: 20px;
    color: gray;
    margin: 0;
}
.iine-num {
    font-size: 10px;
    color: gray;
    margin: 0 auto;
    text-align: center;
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
}
.delete {
    margin:  0;
    position:relative;
    margin-top: 0;
}
.delete-icon {
    width: 30px;
    height: 30px;
    margin: 0;
}
.delete-message {
    font-size: 10px;
    color: gray;
    margin: 0 auto;
    text-align: center;
}
.iine-count {
    font-size: 14px;
    color: gray;
    margin: 0;
}
.username {
    font-weight: 700;
    margin: 5px 0 0px 0;
}
.tweetreload {
    display: flex;
    position: fixed;
    left:  15px;
    bottom: 20px;
    margin: 0;
    width: 70px;
    height: 70px;
    background-color: rgb(134, 134, 134);
    border-radius: 50%;
}
.tweetreload img {
    width: 30px;
    height: 30px;
    display: block;
    margin: auto;
    user-select: none;
    pointer-events: none;
}
.newtweet {
    display: block;
    position: fixed;
    right:  15px;
    bottom: 20px;
    margin: 0;
    width: 70px;
    height: 70px;
    background-color: rgb(92, 153, 230);
    border-radius: 50%;
    z-index: 5;
}
.newtweet p {
    color: white;
    font-size: 2em;
    text-align: center;
    line-height: 70px;
    margin: 0;
    user-select: none;
    pointer-events: none;
}
.tweeting-area {
    display: block;
    flex-direction: column;
    position: fixed;
    width: calc(100% - 20px);
    height: calc(100vh - 20px);
    top: 0;
    left: 0;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.tweeting-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.send-tweet-btn {
    background-color: #1DA1F2;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;

	border-radius: 20px; /* 角丸を入れて、左右が丸いボタンにする */
	padding: 5px 20px; /* 上下左右に余白をトル */
}
.send-tweet-btn p {
    margin: 0;
}
.cancel-btn {
margin-left: 15px;
}
textarea {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
    resize: none;
    font-size: 17px;
    outline: none;
    margin-top: 5px
}
.user-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}
.tweeting-bottom {
    display: flex;
    width: 100%;
    height: calc(100% - 50px);
}

/* 文字数カウンター */
.char-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: bottom 0.3s ease;
}

.char-count {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    transition: stroke 0.3s ease;
}

.progress-ring-circle {
    stroke-dasharray: 100.53 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

/* スマホ表示時の調整 */
@media (max-width: 768px) {
    .char-counter {
        bottom: calc(env(safe-area-inset-bottom) + 20px);
    }
}

/* 文字数が上限に近づいた時の警告色 */
.char-counter.warning .char-count {
    color: #ff9800;
}

.char-counter.warning .progress-ring-circle {
    stroke: #ff9800;
}

.char-counter.danger .char-count {
    color: #f44336;
}

.char-counter.danger .progress-ring-circle {
    stroke: #f44336;
}

.mypage {
    display: none;
    flex-direction: column;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: #ffffff;
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
}

.mypage-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
}

.mypage-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mypage-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.mypage-username {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}

.mypage-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.mypage-tweets {
    padding: 0;
}

.iinelist {
    margin-top: 5px;
    padding: 5px 0;
    border-top: 1px solid #f0f0f0;
}

.iine-count {
    font-size: 13px;
    color: #1DA1F2;
    margin: 5px 0;
    cursor: pointer;
    user-select: none;
}

.iine-count:hover {
    text-decoration: underline;
}

.iine-users {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.iine-users.show {
    display: block;
}

.iine-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin: 5px 0;
    background-color: #fff;
    border-radius: 5px;
}

.iine-user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.iine-user-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.delete {
    margin: auto 10px;
    position: relative;
    margin-top: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.delete:hover .delete-icon {
    opacity: 0.7;
}

.delete-icon {
    width: 25px;
    height: 25px;
    margin: 0;
    transition: opacity 0.2s;
}

.delete-message {
    font-size: 10px;
    color: #f44336;
    margin: 2px 0 0 0;
    text-align: center;
}

.hashtag {
    color: #1DA1F2;
    font-weight: 500;
}

/* いいねアニメーション */
.iine {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.iine-animation-circle {
    position: absolute;
    top: 42.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(216, 65, 126, 0.5);
    pointer-events: none;
    z-index: 1;
}

.iine-animation-circle.active {
    animation: circleExpand 0.6s ease-out forwards;
}

@keyframes circleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    50% {
        width: 25px;
        height: 25px;
        opacity: 0.8;
    }
    100% {
        width: 25px;
        height: 25px;
        opacity: 0;
    }
}

.iine-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.iine-icon.heart-pop {
    animation: heartPop 0.6s ease-out forwards;
}

@keyframes heartPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ローディングアニメーション */
.loading-overlay {
    position: fixed;
    top: 98px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1DA1F2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

/* 映像表示注意メッセージ */
.display-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.display-message-box {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.display-message-box h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.display-message-box p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555;
    text-align: center;
    line-height: 1.6;
}

.display-message-box p strong {
    color: #1DA1F2;
    font-weight: 700;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-container label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.confirm-btn {
    width: 100%;
    padding: 12px;
    background-color: #1DA1F2;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.confirm-btn:hover {
    background-color: #1a8cd8;
}

.confirm-btn:active {
    background-color: #1580c5;
}