/*
 * Space Margarin: Barber / Tricolore Stripe Theme (v1.4.6)
 */
:root {
    --sm-blue: #0055A4;
    --sm-red: #EF4135;
    --sm-white: #FFFFFF;
    --sm-text-dark: #2C3E50;
    --sm-text-muted: #7F8C8D;
    --sm-border: rgba(0, 85, 164, 0.15);
}

/* 全体背景: 床屋さん風の斜めストライプ */
body.sm-clean-body, 
body {
    background-color: #f0f2f5 !important;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 85, 164, 0.05),
        rgba(0, 85, 164, 0.05) 40px,
        #fdfdfd 40px,
        #fdfdfd 80px,
        rgba(239, 65, 53, 0.05) 80px,
        rgba(239, 65, 53, 0.05) 120px,
        #fdfdfd 120px,
        #fdfdfd 160px
    ) !important;
    min-height: 100vh;
    margin: 0;
}

.sm-container {
    width: 100%;
    max-width: 550px;
    margin: 40px auto;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    padding: 0 15px;
    box-sizing: border-box;
}

.sm-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    border-top: 6px solid #0055A4;
    overflow: hidden;
}

/* さりげない上部のアクセントライン */
.sm-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--sm-blue) 33.3%, #fff 33.3%, #fff 66.6%, var(--sm-red) 66.6%);
}

.sm-header {
    text-align: center;
    margin-bottom: 30px;
}

.sm-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sm-icon {
    font-size: 3rem;
    line-height: 1;
}

.sm-title {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 6px;
    color: var(--sm-blue);
    text-transform: uppercase;
    margin-bottom: 0;
}

.sm-description {
    text-align: center;
    margin: 15px auto 35px;
    color: var(--sm-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.sm-field {
    margin-bottom: 30px;
    text-align: left;
}

.sm-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sm-text-dark);
}

.sm-field input[type="password"],
.sm-field input[type="text"] {
    width: 100%;
    padding: 14px;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--sm-text-dark);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.sm-field input:focus {
    border-color: var(--sm-blue);
    background: #fff;
}

.sm-help {
    display: block !important;
    font-size: 0.8rem;
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--sm-text-muted);
    line-height: 1.4;
    clear: both;
}

/* ラッパーで物理的に距離を離す */
.sm-drop-wrapper {
    display: block !important;
    width: 100%;
    margin-top: 25px;
    margin-bottom: 30px;
    clear: both;
}

/* ドロップエリア */
.sm-drop-area {
    display: block !important;
    border: 2px dashed var(--sm-blue);
    background: #f8fbff;
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.sm-drop-area:hover {
    background: #fff;
    border-color: var(--sm-red);
}

.sm-drop-area.highlight {
    background: #f0f7ff;
    border-color: var(--sm-red);
}

.sm-drop-area p {
    color: var(--sm-blue) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.5 !important;
}

.sm-select-link {
    color: var(--sm-text-dark);
    font-size: 0.85rem;
    text-decoration: underline;
    opacity: 0.8;
}

.sm-upload-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--sm-blue);
    display: block;
    font-style: normal;
}

/* ボタン */
.sm-btn {
    width: 100%;
    padding: 16px;
    background: var(--sm-blue);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 2px;
    box-shadow: 0 4px 0 #004485;
}

.sm-btn:hover {
    background: #004a91;
    transform: translateY(1px);
    box-shadow: 0 2px 0 #004485;
}

/* 成功画面 */
.sm-success-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
}

.sm-info-display {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid var(--sm-blue);
}

.sm-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ebebeb;
}

.sm-info-item:last-child {
    border-bottom: none;
}

.sm-label {
    font-size: 0.8rem;
    color: var(--sm-text-muted);
    font-weight: 600;
}

.sm-info-item code {
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--sm-blue);
    border: 1px solid #eee;
    font-family: inherit;
    font-weight: 600;
}

/* コピーボタン */
.sm-copy-btn {
    width: 100%;
    padding: 15px;
    background: #fff;
    color: var(--sm-red) !important;
    border: 2px solid var(--sm-red);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-size: 1rem;
}

.sm-copy-btn:hover {
    background: var(--sm-red);
    color: #fff !important;
}

/* フッター */
.sm-footer-link {
    margin-top: 35px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--sm-text-muted);
}

.sm-footer-link a {
    color: var(--sm-blue);
    text-decoration: none;
}

/* ローディング */
.sm-status {
    text-align: center;
    padding: 20px 0;
}

.sm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--sm-blue);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: sm-spin 1s linear infinite;
}

@keyframes sm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
