/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 헤더 스타일 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* 햄버거 버튼 스타일 */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.hamburger-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 슬라이드 메뉴 스타일 */
.slide-menu {
    position: fixed;
    top: 0;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.slide-menu.right-menu {
    right: 0;
    left: auto;
    transform: translateX(100%);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
}

.slide-menu.active {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 70px;
}

.menu-header h3 {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #667eea;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: rotate(90deg);
}

.menu-list {
    list-style: none;
    padding: 20px 0;
}

.menu-list li {
    margin: 0;
}

.menu-list a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.menu-list a:hover {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    transform: translateX(10px);
}

/* 오버레이 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 메인 컨텐츠 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
}

/* 통합 제목 스타일 */
.main-calculator-title {
    text-align: center;
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 1000px;
    margin: 0 auto 40px auto;
}

/* 평단가 계산기 스타일 */

/* 종목 관리 섹션 */
.stock-management {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(52, 73, 94, 0.8);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

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

.stock-title-group {
    flex: 1;
}

.stock-title-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(149, 165, 166, 0.5);
    border-radius: 12px;
    background: rgba(236, 240, 241, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    font-size: 16px;
    transition: all 0.3s ease;
}

.stock-title-input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
}

.stock-title-input::placeholder {
    color: rgba(44, 62, 80, 0.6);
}

.stock-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stock-select {
    padding: 12px 16px;
    border: 1px solid rgba(149, 165, 166, 0.5);
    border-radius: 12px;
    background: rgba(236, 240, 241, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    font-size: 14px;
    min-width: 150px;
    transition: all 0.3s ease;
}

.stock-select:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 1);
}

.stock-select option {
    background: #2c3e50;
    color: #ffffff;
}

/* 햄버거 컨테이너 */
.hamburger-container {
    position: relative;
    display: inline-block;
    overflow: visible;
    z-index: 999999;
}

/* 햄버거 메뉴 버튼 */
.hamburger-menu-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.hamburger-menu-btn span {
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* 드롭다운 메뉴 */
.stock-menu-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(149, 165, 166, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.stock-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.menu-item:first-child {
    margin-top: 8px;
}

.menu-item:last-child {
    margin-bottom: 8px;
}

/* 팝업 스타일 */
.stock-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.stock-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.stock-popup {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.stock-popup-overlay.show .stock-popup {
    transform: scale(1);
}

.popup-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.popup-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.popup-content {
    padding: 20px 25px;
}

.popup-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
    font-size: 16px;
    transition: all 0.3s ease;
}

.popup-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 1);
}

.popup-actions {
    padding: 15px 25px 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.cancel-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.save-btn {
    background: #4CAF50;
    color: white;
}

.save-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.calculator-title {
    text-align: center;
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 30px;
    font-weight: 700;
}

.calculator-table {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.table-header, .table-footer {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1fr 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.table-footer {
    background: linear-gradient(45deg, #764ba2, #667eea);
    font-weight: 700;
    font-size: 1.1rem;
}

.header-cell, .footer-cell {
    padding: 15px 10px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.header-cell:last-child, .footer-cell:last-child {
    border-right: none;
}

.table-body {
    /* 세로 스크롤 제거하여 가로 스크롤만 사용 */
}

.table-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1fr 80px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.table-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-cell {
    padding: 12px 10px;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-cell:last-child {
    border-right: none;
}

.row-number {
    font-weight: 600;
    color: #667eea;
}

.input-field {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    background-color: rgba(102, 126, 234, 0.1);
}

.total-display {
    font-weight: 600;
    color: #333;
    background-color: rgba(102, 126, 234, 0.05);
    border-radius: 5px;
    padding: 5px;
}

.delete-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.calculator-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.calculator-controls button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.calculator-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.clear-all-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
}

.clear-all-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5) !important;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-item {
    background: rgba(102, 126, 234, 0.1);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.summary-label {
    display: block;
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: black;
}

/* 수익률 계산기 스타일 */
.profit-calculator-container {
    max-width: 1000px;
    margin: 40px auto 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.profit-input-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-with-unit:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profit-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.unit {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.profit-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.calculate-btn, .auto-fill-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auto-fill-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.calculate-btn:hover, .auto-fill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.auto-fill-btn:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.profit-result-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profit-display {
    padding: 0;
}

.profit-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    text-align: center;
}

.profit-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.profit-header span {
    font-size: 2.2rem;
    font-weight: 800;
}

.profit-details {
    padding: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 1rem;
}

.detail-value {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

/* 수익/손실에 따른 색상 변경 */
.profit-positive {
    color: #ff4757 !important;
    font-weight: 700;
}

.profit-negative {
    color: #3742fa !important;
    font-weight: 700;
}

.profit-neutral {
    color: #6c757d !important;
    font-weight: 600;
}

.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-section h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.content-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card h3 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
}

.card p {
    color: #666;
    line-height: 1.8;
}

/* 푸터 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
    transition: color 0.3s ease;
}

.footer-content p:hover {
    color: rgba(255, 255, 255, 1);
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer-links a:hover {
    color: #667eea;
    background: rgba(255, 255, 255, 0.1);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }
    
    .slide-menu {
        width: 280px;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .content-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 태블릿에서도 테이블 스크롤 개선 */
    .calculator-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* 스크롤바 숨기기 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .calculator-table::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .table-header, .table-footer, .table-row {
        grid-template-columns: 50px 120px 100px 120px 100px 70px;
        min-width: 560px;
    }
    
    .header-cell, .footer-cell, .table-cell {
        padding: 12px 6px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 15px;
    }
    
    /* 햄버거 메뉴 버튼 위치 고정 */
    .hamburger-container {
        position: relative;
        display: inline-block;
        overflow: visible !important;
        z-index: 999999 !important;
    }
    
    .hamburger-menu-btn {
        position: relative;
        top: 0;
        right: 0;
    }
    
    .slide-menu {
        width: 250px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .calculator-container {
        padding: 15px;
        margin: 10px;
		margin-left: 0px;
		margin-right: 0px;
    }
    
    .calculator-title {
        font-size: 2rem;
    }
    
    .main-calculator-title {
        font-size: 2rem;
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    /* 모바일에서 테이블을 가로 스크롤 가능하게 만들기 */
    .calculator-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* 스크롤바 숨기기 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .calculator-table::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    /* 스크롤 힌트 추가 */
    .calculator-table::after {
        content: '← 좌우로 스크롤하세요 →';
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: #667eea;
        opacity: 0.7;
        white-space: nowrap;
    }
    
    .table-header, .table-footer, .table-row {
        grid-template-columns: 50px 100px 80px 100px 80px 70px;
        min-width: 480px;
        font-size: 0.8rem;
    }
    
    .header-cell, .footer-cell, .table-cell {
        padding: 6px 2px;
        font-size: 0.8rem;
    }
    
    /* 모바일에서 입력 필드 크기 조정 */
    .input-field {
        font-size: 0.75rem;
        padding: 3px;
        min-width: 0;
    }
    
    /* 모바일에서 삭제 버튼 크기 증가 */
    .delete-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        min-width: 36px;
        flex-shrink: 0;
    }
    
    .calculator-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .calculator-controls button {
        width: 100%;
        max-width: 250px;
    }
    
    .result-summary {
        grid-template-columns: 1fr;
    }
    
    .profit-calculator-container {
        padding: 20px;
        margin: 20px 0px 0;
		margin-left: 0px;
		margin-right: 0px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 모바일에서 input 요소가 튀어나오지 않도록 제한 */
    .input-with-unit {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .profit-input {
        min-width: 0;
        width: 100%;
    }
    
    .profit-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .calculate-btn, .auto-fill-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .profit-header h3 {
        font-size: 1.5rem;
    }
    
    .profit-header span {
        font-size: 1.8rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-value {
        align-self: flex-end;
    }
    
    /* 종목 관리 반응형 */
    .stock-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .stock-controls {
        justify-content: space-between;
    }
    
    .stock-select {
        min-width: auto;
        flex: 1;
    }
    
    .stock-menu-dropdown {
        right: 10px;
        min-width: 180px;
        z-index: 999999 !important;
        position: absolute !important;
    }
    
    .stock-popup {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header {
        padding: 15px 20px 10px;
    }
    
    .popup-content {
        padding: 15px 20px;
    }
    
    .popup-actions {
        padding: 10px 20px 20px;
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .popup-btn:last-child {
        margin-bottom: 0;
    }
}