        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            width: 100%;
            height: 100%;
            -webkit-text-size-adjust: 100%;
            -moz-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            text-size-adjust: 100%;
            overflow-x: hidden;
        }

        body {
            font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
            background: #0f0f0f;
            color: #ffffff;
            line-height: 1.4;
            overflow-x: hidden;
            font-size: 16px;
            width: 100%;
            max-width: 100%;
            min-height: 100vh;
            position: relative;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 로딩 화면 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #0f0f0f;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }

        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid #333;
            border-top: 3px solid #ff4757;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .connecting-text {
            color: #ff4757;
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .connecting-status {
            color: #888;
            font-size: 14px;
        }

        /* 헤더 */
        .header {
            background: #1a1a1a;
            padding: 10px 16px;
            border-bottom: 2px solid #ff4757;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(255, 71, 87, 0.2);
        }

        .header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 18px;
            font-weight: 700;
            color: #ff4757;
        }

        .logo i {
            color: #ff4757;
            text-shadow: 0 0 8px rgba(255, 71, 87, 0.5);
        }

        .live-status {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 71, 87, 0.1);
            padding: 6px 12px;
            border-radius: 15px;
            border: 1px solid #ff4757;
        }

        .live-dot {
            width: 6px;
            height: 6px;
            background: #ff4757;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .live-text {
            font-size: 12px;
            font-weight: 600;
            color: #ff4757;
        }

        /* 메인 컨테이너 */
        .main-container {
            padding: 8px 8px 120px 8px;
            min-height: calc(100vh - 80px);
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            overflow-x: hidden;
        }

        /* 모바일 최적화 */
        @media screen and (max-width: 768px) {
            body {
                -webkit-text-size-adjust: none;
                font-size: 18px;
            }

            .main-container {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                padding: 6px;
            }

            .stock-card, .supply-card, .alerts-card, .news-card, .disclosure-card {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                overflow-x: hidden;
            }
        }

        /* 종목 대기 오버레이 */
        .waiting-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 5000;
        }

        .waiting-overlay.active {
            display: flex;
        }

        .waiting-content {
            text-align: center;
            padding: 40px 20px;
        }

        .waiting-icon {
            width: 60px;
            height: 60px;
            border: 4px solid #333;
            border-top: 4px solid #ff4757;
            border-radius: 50%;
            animation: spin 2s linear infinite;
            margin: 0 auto 24px;
        }

        .waiting-title {
            font-size: 18px;
            font-weight: 700;
            color: #ff4757;
            margin-bottom: 8px;
        }

        .waiting-subtitle {
            color: #888;
            font-size: 16px;
            margin-bottom: 8px;
        }

        /* 종목 정보 카드 */
        .stock-card {
            background: linear-gradient(145deg, #ffe6e6, #ffcccc);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 8px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .stock-header {
            background: linear-gradient(90deg, #dc3545, #e74c3c);
            color: white;
            padding: 10px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .date-info {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        .viewer-count {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        /* 종목 메인 정보 */
        .stock-main {
            background: #ffffff;
            padding: 12px;
        }

        .stock-name-section {
            text-align: center;
            margin-bottom: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            position: relative;
        }

        .copy-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: #6c757d;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 10px;
            cursor: pointer;
        }

        .stock-name {
            font-size: 18px;
            font-weight: 900;
            color: #000;
            margin-bottom: 8px;
            background: linear-gradient(to bottom, transparent 53%, #FFFF00 87%, #FFFF00 75%, transparent 85%);
            padding: 4px 8px;
            border-radius: 6px;
            display: inline-block;
            cursor: pointer;
            position: relative;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .stock-name:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
        }

        .stock-name:active {
            transform: translateY(0px);
            box-shadow: 0 2px 6px rgba(255, 71, 87, 0.3);
        }

        .stock-name::after {
            content: "📋 클릭하여 복사";
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 400;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 1000;
        }

        .stock-name:hover::after {
            opacity: 1;
        }

        .stock-code {
            font-size: 14px;
            font-weight: 700;
            color: #666;
            margin-bottom: 8px;
            cursor: pointer;
            position: relative;
            padding: 4px 8px;
            border-radius: 4px;
            transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
        }

        .stock-code:hover {
            transform: translateY(-1px);
            background-color: rgba(255, 71, 87, 0.1);
            box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
        }

        .stock-code:active {
            transform: translateY(0px);
            background-color: rgba(255, 71, 87, 0.2);
        }

        .stock-code::after {
            content: "📋 클릭하여 복사";
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 400;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 1000;
        }

        .stock-code:hover::after {
            opacity: 1;
        }

        .theme-tags {
            display: flex;
            justify-content: center;
            gap: 4px;
            flex-wrap: wrap;
        }

        .theme-tag {
            background: #ff4757;
            color: white;
            padding: 3px 6px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 600;
        }

        .theme-tag.default {
            background: #6c757d;
        }

        /* 기본 정보 그리드 */
        .basic-info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin: 16px 0;
        }

        .info-item {
            background: #f8f9fa;
            padding: 10px 8px;
            border-radius: 8px;
            text-align: center;
        }

        .info-label {
            font-size: 10px;
            color: #666;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .info-value {
            font-size: 14px;
            font-weight: 900;
            color: #000;
        }

        .info-value.up {
            color: #dc3545;
        }

        .info-value.down {
            color: #007bff;
        }

        .info-value.special {
            color: #6f42c1;
        }

        /* 매수/목표/손절 섹션 */
        .trading-info {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 1px;
            background: #dee2e6;
            margin: 8px 0;
            border-radius: 8px;
            overflow: hidden;
        }

        .trading-item {
            background: white;
            padding: 10px 8px;
            text-align: center;
        }

        .trading-label {
            font-size: 10px;
            color: #666;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .trading-value {
            font-size: 14px;
            font-weight: 900;
        }

        .trading-value.entry {
            color: #dc3545;
            background: linear-gradient(to bottom, transparent 53%, #FFFF00 87%, #FFFF00 75%, transparent 85%);
            padding: 2px 6px;
            border-radius: 4px;
            display: inline-block;
        }

        .trading-value.target {
            color: #dc3545;
        }

        .trading-value.stop {
            color: #007bff;
        }

        /* 추가 정보 그리드 */
        .additional-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 8px;
        }

        .additional-item {
            background: #f8f9fa;
            padding: 10px 8px;
            border-radius: 6px;
            text-align: center;
        }

        .additional-label {
            font-size: 9px;
            color: #666;
            font-weight: 600;
            margin-bottom: 4px;
            line-height: 1.2;
        }

        .additional-value {
            font-size: 12px;
            font-weight: 700;
            color: #000;
        }

        /* 실시간 수급현황 */
        .supply-card {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 8px;
            border: 1px solid #333;
        }

        .supply-header {
            background: #f8f9fa;
            padding: 10px 16px;
            text-align: center;
        }

        .supply-title {
            color: #dc3545;
            font-size: 14px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .supply-table {
            background: white;
        }

        .supply-table-header {
            display: grid;
            grid-template-columns: 30px 55px 45px 50px 90px 65px;
            gap: 4px;
            padding: 8px 4px;
            background: #f8f9fa;
            font-size: 10px;
            color: #333 !important;
            font-weight: 600;
            text-align: center;
            border-bottom: 1px solid #dee2e6;
        }

        .supply-table-header span {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        .supply-data-container {
            max-height: 200px;
            overflow-y: auto;
            background: white;
            min-height: 200px;
        }

        .supply-row {
            display: grid;
            grid-template-columns: 30px 70px 60px 70px 80px 50px;
            gap: 2px;
            padding: 6px 4px;
            font-size: 10px;
            text-align: center;
            border-bottom: 1px solid #f0f0f0;
            color: #333;
        }

        .supply-row:nth-child(even) {
            background: #f9f9f9;
        }

        .supply-buy {
            color: #dc3545;
            font-weight: 700;
        }

        .supply-sell {
            color: #007bff;
            font-weight: 700;
        }

        /* 알림 카드 */
        .alerts-card {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 8px;
            border: 1px solid #333;
        }

        .alerts-header {
            background: #ff4757;
            color: white;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 700;
        }

        .alerts-content {
            background: white;
            height: 260px;
            overflow-y: auto;
            padding: 0;
        }

        .alerts-content .empty-message {
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .empty-message {
            color: #666;
            font-size: 14px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            padding: 20px;
        }

        .loading-spinner-small {
            width: 20px;
            height: 20px;
            border: 2px solid #e0e0e0;
            border-top: 2px solid #ff4757;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 8px;
        }

        /* 뉴스 카드 */
        .news-card {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 8px;
            border: 1px solid #333;
        }

        .news-header {
            background: #28a745;
            color: white;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 14px;
            font-weight: 700;
        }

        .discussion-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .discussion-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .discussion-btn.disabled {
            background: rgba(108, 117, 125, 0.3);
            border: 1px solid rgba(108, 117, 125, 0.5);
            color: rgba(255, 255, 255, 0.5);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .discussion-btn.disabled:hover {
            background: rgba(108, 117, 125, 0.3);
            transform: none;
            box-shadow: none;
        }

        .news-content {
            background: white;
            height: auto;
            overflow-y: hidden;
            padding: 0;
        }

        .news-content .empty-message {
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* 공시 카드 */
        .disclosure-card {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 30px;
            border: 1px solid #333;
        }

        .disclosure-header {
            background: #6f42c1;
            color: white;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 700;
        }

        .disclosure-content {
            background: white;
            height: auto;
            overflow-y: hidden;
            padding: 0;
        }

        .disclosure-content .empty-message {
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* 하단 컨트롤 */
        .bottom-controls {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            background: #1a1a1a;
            padding: 10px 16px;
            border-top: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            box-sizing: border-box;
            gap: 16px;
        }

        .disclaimer {
            font-size: 10px;
            color: #888;
            line-height: 1.3;
            flex: 1;
        }

        .control-buttons {
            display: flex;
            gap: 8px;
        }

        .control-btn {
            background: #333;
            border: 1px solid #555;
            color: #fff;
            padding: 8px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            min-width: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .control-btn:hover, .control-btn.active {
            background: #ff4757;
            border-color: #ff4757;
        }

        /* 뉴스 팝업 */
        .popup-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            align-items: flex-start;
            justify-content: center;
            z-index: 10000;
            padding: 10px;
            overflow-y: auto;
        }

        .popup-window {
            background: white;
            border-radius: 12px;
            width: 100%;
            max-width: 100%;
            height: calc(100vh - 20px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin-top: 10px;
        }

        .popup-header {
            background: #ff4757;
            color: white;
            padding: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .popup-title {
            font-size: 14px;
            font-weight: 600;
            color: white;
            margin: 0;
            line-height: 1.4;
            word-break: break-word;
            overflow-wrap: break-word;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .popup-header-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            align-items: center;
            margin-top: 4px;
        }

        .popup-copy-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 0 10px;
            border-radius: 6px;
            font-size: 11px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            white-space: nowrap;
            height: 32px;
        }

        .popup-copy-btn:hover, .popup-copy-btn:active {
            background: rgba(255, 255, 255, 0.3);
        }

        .popup-close {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 0;
            border-radius: 6px;
            font-size: 18px;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .popup-close:hover, .popup-close:active {
            background: rgba(255, 255, 255, 0.3);
        }

        .popup-iframe {
            flex: 1;
            border: none;
            width: 100%;
            background: white;
            min-height: 0;
        }


        /* 터치 최적화 */
        .touchable {
            cursor: pointer;
            -webkit-tap-highlight-color: rgba(255, 71, 87, 0.2);
        }

        .touchable:active {
            transform: scale(0.98);
            transition: transform 0.1s ease;
        }

        /* 스크롤바 커스터마이징 */
        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

        ::-webkit-scrollbar-thumb {
            background: #ff4757;
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #e63946;
        }

        /* 모바일 전용 애니메이션 */
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .mobile-notification {
            animation: slideInRight 0.3s ease-out;
        }

        /* 반응형 최적화 */
        @media (max-width: 360px) {
            .basic-info-grid {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .trading-info {
                grid-template-columns: 1fr;
            }

            .supply-table-header,
            .supply-row {
                grid-template-columns: 26px 48px 40px 46px 75px 58px !important;
                font-size: 9px;
                gap: 3px !important;
                padding: 6px 3px !important;
            }
        }