* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    background: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #7f8c8d;
    font-size: 14px;
}

.version-info {
    color: #95a5a6;
    font-size: 12px;
    font-family: 'Monaco', 'Courier New', monospace;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

section {
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ecf0f1;
}

.status-section {
    margin-bottom: 0;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

/* shadcn 스타일 카드 */
.status-card {
    background: hsl(0 0% 100%);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.status-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 첫 번째 카드 - Primary 색상 */
.status-card:nth-child(1) {
    border: 1px solid hsl(221.2 83.2% 53.3%);
}

/* 두 번째 카드 - Success 색상 */
.status-card:nth-child(2) {
    border: 1px solid hsl(142.1 76.2% 36.3%);
}

/* 세 번째 카드 - Warning 색상 */
.status-card:nth-child(3) {
    border: 1px solid hsl(38 92% 50%);
}

/* 네 번째 카드 - Info 색상 */
.status-card:nth-child(4) {
    border: 1px solid hsl(199 89% 48%);
}

.status-label {
    font-size: 12px;
    color: hsl(215.4 16.3% 46.9%);
    margin-bottom: 6px;
    font-weight: 500;
}

.status-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

/* 각 카드별 값 색상 (더 구체적인 선택자로 우선순위 높임) */
.status-card:nth-child(1) .status-value {
    color: hsl(221.2 83.2% 53.3%) !important;
}

.status-card:nth-child(2) .status-value {
    color: hsl(142.1 76.2% 36.3%) !important;
}

.status-card:nth-child(3) .status-value {
    color: hsl(38 92% 50%) !important;
}

.status-card:nth-child(4) .status-value {
    color: hsl(199 89% 48%) !important;
}

/* 통합 정보 섹션 */
.info-section {
    margin-bottom: 0;
}

.info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.info-links {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.info-sender {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 6px;
    flex: 0 0 auto;
    cursor: help;
    transition: background 0.2s;
    position: relative;
}

.info-sender:hover {
    background: #e9ecef;
}

/* 툴팁 스타일 */
.info-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 툴팁 화살표 */
.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
}

/* Hover 시 툴팁 표시 */
.info-sender:hover .info-tooltip {
    visibility: visible;
    opacity: 1;
}

/* 컴팩트 링크 버튼 */
.link-button-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: hsl(221.2 83.2% 53.3%);
    color: hsl(0 0% 100%);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.link-button-compact:hover {
    background: hsl(221.2 83.2% 48%);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.link-button-compact:active {
    background: hsl(221.2 83.2% 45%);
}

/* 구글 드라이브 버튼 (초록색 계열) */
.link-button-compact.link-button-drive {
    background: hsl(142.1 76.2% 36.3%);
}

.link-button-compact.link-button-drive:hover {
    background: hsl(142.1 70.6% 32.2%);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.link-button-compact.link-button-drive:active {
    background: hsl(142.1 70.6% 28.2%);
}

.actions-section {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* shadcn 스타일 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    position: relative;
    padding: 8px 16px;
    height: auto;
    line-height: 1.5;
}

.btn:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Primary 버튼 (shadcn default) */
.btn.btn-primary,
button.btn-primary {
    background: hsl(221.2 83.2% 53.3%) !important;
    color: hsl(0 0% 100%) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn.btn-primary:hover,
button.btn-primary:hover {
    background: hsl(221.2 83.2% 48%) !important;
}

.btn.btn-primary:active,
button.btn-primary:active {
    background: hsl(221.2 83.2% 45%) !important;
}

/* Success 버튼 (shadcn variant) */
.btn.btn-success,
button.btn-success {
    background: hsl(142.1 76.2% 36.3%) !important;
    color: hsl(0 0% 100%) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn.btn-success:hover,
button.btn-success:hover {
    background: hsl(142.1 70.6% 32.2%) !important;
}

.btn.btn-success:active,
button.btn-success:active {
    background: hsl(142.1 70.6% 28.2%) !important;
}

/* Secondary 버튼 (shadcn secondary) */
.btn-secondary {
    background: hsl(210 40% 96.1%);
    color: hsl(222.2 47.4% 11.2%);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: hsl(210 40% 90%);
}

.btn-secondary:active {
    background: hsl(210 40% 85%);
}

/* Destructive 버튼 (shadcn destructive) */
.btn-destructive {
    background: hsl(0 84.2% 60.2%);
    color: hsl(0 0% 100%);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-destructive:hover {
    background: hsl(0 72.2% 50.6%);
}

.btn-destructive:active {
    background: hsl(0 72.2% 45.6%);
}

/* Outline 버튼 (shadcn outline) */
.btn.btn-outline,
button.btn-outline {
    background: transparent !important;
    color: hsl(222.2 47.4% 11.2%) !important;
    border: 1px solid hsl(214.3 31.8% 91.4%) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn.btn-outline:hover,
button.btn-outline:hover {
    background: hsl(210 40% 96.1%) !important;
    color: hsl(222.2 47.4% 11.2%) !important;
}

.btn.btn-outline:active,
button.btn-outline:active {
    background: hsl(210 40% 90%) !important;
}

/* Ghost 버튼 (shadcn ghost) */
.btn-ghost {
    background: transparent;
    color: hsl(222.2 47.4% 11.2%);
    box-shadow: none;
}

.btn-ghost:hover {
    background: hsl(210 40% 96.1%);
    color: hsl(222.2 47.4% 11.2%);
}

.btn-ghost:active {
    background: hsl(210 40% 90%);
}

/* Info 버튼 (기존 유지하되 shadcn 스타일 적용) */
.btn-info {
    background: hsl(217.2 32.6% 17.5%);
    color: hsl(0 0% 100%);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-info:hover {
    background: hsl(217.2 32.6% 14.5%);
}

.btn-info:active {
    background: hsl(217.2 32.6% 12.5%);
}

.console-section {
    margin-bottom: 0;
}

.console {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
    min-height: 200px;
}

.console-line {
    margin-bottom: 4px;
    padding: 2px 0;
    word-wrap: break-word;
}

.console-line.info {
    color: #3498db;
}

.console-line.success {
    color: #2ecc71;
}

.console-line.error {
    color: #e74c3c;
}

.console-line.warning {
    color: #f39c12;
}

.console-line::before {
    content: '> ';
    opacity: 0.5;
}

/* 버튼 크기 변형 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    height: auto;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    height: auto;
}

/* 로딩 상태 */
.btn.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .status-cards {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 새로고침 아이콘 회전 애니메이션 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
