/* IVTile Tools 공통 CSS 파일 */
/* 모든 툴의 CSS를 통합하여 DB 의존성을 제거 */

/* ===== 기본 툴 레이아웃 스타일 ===== */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 80px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.1);
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #D5DBDB;
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    border-radius: 10px;
    padding: 30px 20px;
    margin: -20px -20px 30px -20px;
    position: relative;
}

.tool-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(139, 157, 195, 0.3);
}

.tool-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 500;
}

.tool-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #D5DBDB;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.05);
}

.tool-description-section {
    background: linear-gradient(135deg, #E8EAED 0%, #F8F9FA 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #D5DBDB;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.05);
}

.tool-description-section h3 {
    color: #8B9DC3;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.description-content {
    color: #2C3E50;
    line-height: 1.6;
}

.description-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.description-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.description-content li {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* ===== Text Statistics 툴 스타일 ===== */
.text-statistics {
    max-width: 100%;
    margin: 0 auto;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
}

.input-section h4 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #D5DBDB;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

#textInput:focus {
    outline: none;
    border-color: #8B9DC3;
    box-shadow: 0 0 10px rgba(139, 157, 195, 0.2);
}

.stats-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
}

.stats-section h4 {
    color: #8B9DC3;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #D5DBDB;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #8B9DC3;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #5D6D7E;
    font-weight: 500;
}

.additional-stats {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
    margin-top: 20px;
    grid-column: 1 / -1;
}

.additional-stats h4 {
    color: #8B9DC3;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.detail-item {
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 100%);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #D5DBDB;
}

.detail-label {
    font-size: 0.85rem;
    color: #5D6D7E;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2C3E50;
}

/* ===== Barcode Generator 툴 스타일 ===== */
.barcode-generator {
    max-width: 100%;
    margin: 0 auto;
}

.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.barcode-options {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
}

.barcode-options h4 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.option-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.button-group {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.output-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
    grid-column: 1 / -1;
}

.output-section h4 {
    color: #8B9DC3;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

#barcodeOutput {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #D5DBDB;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Calculator 툴 스타일 ===== */
.calculator {
    max-width: 100%;
    margin: 0 auto;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.calculator-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
}

.calculator-display h4 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

#calculatorDisplay {
    width: 100%;
    padding: 15px;
    border: 2px solid #D5DBDB;
    border-radius: 10px;
    font-size: 18px;
    text-align: right;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
}

.calculator-buttons {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
    border: 1px solid #D5DBDB;
}

.calculator-buttons h4 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 15px;
    border: 2px solid #D5DBDB;
    border-radius: 8px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 100%);
    color: #2C3E50;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.2);
    border-color: #8B9DC3;
}

.calc-btn.operator {
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
}

.calc-btn.equals {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.calc-btn.clear {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

/* ===== 공통 버튼 스타일 ===== */
button {
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.3);
}

button:active {
    transform: translateY(0);
}

/* ===== 공통 입력 필드 스타일 ===== */
input[type="text"], input[type="number"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D5DBDB;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #8B9DC3;
    box-shadow: 0 0 10px rgba(139, 157, 195, 0.2);
}

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D5DBDB;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #8B9DC3;
    box-shadow: 0 0 10px rgba(139, 157, 195, 0.2);
}

/* ===== 공통 섹션 스타일 ===== */
h3, h4 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.3rem;
}

/* ===== 툴 페이지 공통 스타일 ===== */
.last-updated-info {
    position: absolute;
    bottom: 10px;
    right: 20px;
    background: rgba(139, 157, 195, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(139, 157, 195, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.last-updated-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.last-updated-text::before {
    content: "🕒";
    font-size: 14px;
}

/* 툴 헤더에 상대 위치 설정 */
.tool-header {
    position: relative;
}

/* 뒤로가기 버튼 스타일 */
.back-button-top {
    position: absolute !important;
    top: -41px !important;
    left: 20px !important;
    z-index: 100 !important;
}

.back-btn-top {
    padding: 8px 12px;
    border: 2px solid #8B9DC3;
    border-radius: 8px;
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(139, 157, 195, 0.5);
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    min-width: 50px;
    height: 36px;
}

.back-btn-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 157, 195, 0.4);
}

.back-button-description {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 100 !important;
}

.back-btn-description {
    padding: 6px 10px;
    border: 2px solid #8B9DC3;
    border-radius: 6px;
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(139, 157, 195, 0.3);
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    min-width: 45px;
    height: 28px;
}

.back-btn-description:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.4);
}

/* SNS 공유 버튼 스타일 */
.sns-share-floating {
    position: absolute !important;
    top: -41px !important;
    right: 20px !important;
    z-index: 200 !important;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.bookmark-btn {
    background: rgba(139, 157, 195, 0.9) !important;
    border: 1px solid rgba(139, 157, 195, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 60px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    z-index: 101 !important;
    position: relative !important;
}

.bookmark-btn:hover {
    background: rgba(139, 157, 195, 1);
    border-color: rgba(139, 157, 195, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.4);
}

.bookmark-btn.bookmarked {
    background: rgba(255, 193, 7, 0.9);
    border-color: rgba(255, 193, 7, 0.3);
    color: #333;
}

.bookmark-btn.bookmarked:hover {
    background: rgba(255, 193, 7, 1);
    border-color: rgba(255, 193, 7, 0.5);
}

.share-toggle-btn {
    padding: 8px 12px;
    border: 2px solid #8B9DC3;
    border-radius: 8px;
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(139, 157, 195, 0.5);
    transition: all 0.3s ease;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    min-width: 50px;
    height: 36px;
}

.share-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 157, 195, 0.4);
}

.share-toggle-btn.active {
    background: linear-gradient(135deg, #A8B8D1 0%, #8B9DC3 100%);
    transform: scale(1.05);
}

.share-menu {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    z-index: 200;
    position: relative;
}

.share-menu.active {
    display: flex;
}

.share-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #8B9DC3;
    background: linear-gradient(135deg, #8B9DC3 0%, #A8B8D1 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.share-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.4);
}

.share-icon.facebook:hover {
    color: #1877F2 !important;
    background: rgba(24, 119, 242, 0.2) !important;
}

.share-icon.twitter:hover {
    color: #1DA1F2 !important;
    background: rgba(29, 161, 242, 0.2) !important;
}

.share-icon.kakao:hover {
    color: #FEE500 !important;
    background: rgba(254, 229, 0, 0.2) !important;
}

.share-icon.link:hover {
    color: #7A8BB0 !important;
    background: rgba(139, 157, 195, 0.2) !important;
}

/* 랜덤 툴 보기 버튼 스타일 */
.random-tool-section {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

.btn-random-tool {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-random-tool:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-random-tool:active {
    transform: translateY(-1px) scale(1.02);
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .tool-container {
        padding: 10px;
        margin-top: 80px;
    }
    
    .tool-title {
        font-size: 2rem;
    }
    
    .tool-content, .tool-description-section {
        padding: 20px;
    }
    
    .tool-header {
        margin: -10px -10px 20px -10px;
        padding: 20px 15px;
    }
    
    .stats-container, .generator-container, .calculator-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    #textInput {
        min-height: 150px;
    }
    
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .last-updated-info {
        bottom: 8px;
        right: 10px;
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .back-button-top {
        top: -37px;
        left: 15px;
    }
    
    .back-btn-top {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 45px;
        height: 32px;
    }
    
    .back-button-description {
        top: 10px;
        left: 10px;
    }
    
    .back-btn-description {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 40px;
        height: 24px;
    }
    
    .sns-share-floating {
        top: -37px;
        right: 15px;
        gap: 6px;
    }
    
    .bookmark-btn {
        padding: 6px 10px;
        font-size: 10px;
        min-width: 50px;
        height: 28px;
    }
    
    .share-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 45px;
        height: 32px;
    }
    
    .share-icon {
        width: 36px;
        height: 36px;
    }
    
    .btn-random-tool {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 20px 15px;
    }
    
    .tool-title {
        font-size: 1.8rem;
    }
    
    .input-section, .stats-section, .additional-stats, .barcode-options, .output-section, .calculator-display, .calculator-buttons {
        padding: 20px;
    }
    
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* ===== 애니메이션 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .detail-item {
    animation: fadeInUp 0.5s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }
