/* CalWhat Calculator Platform - RingSizeCalculator Specific Styles */
/* This file contains calculator-specific styles */

    @keyframes rotate {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

 

    /* 測量方式選擇 */
    .measurement-method {
        display: flex;
        gap: 15px;
        margin-bottom: 25px;
        flex-wrap: wrap;
    }

    .method-option {
        flex: 1;
        min-width: 150px;
        padding: 15px;
        border: 2px solid #f9a8d4;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        background: white;
    }

        .method-option:hover {
            border-color: #ec4899;
            background: #fdf2f8;
            transform: translateY(-2px);
        }

        .method-option.active {
            border-color: #d946ef;
            background: linear-gradient(135deg, rgba(217, 70, 239, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
            box-shadow: 0 4px 15px rgba(217, 70, 239, 0.2);
        }

        .method-option i {
            font-size: 1.8rem;
            color: #ec4899;
            margin-bottom: 8px;
            display: block;
        }

        .method-option span {
            font-weight: 600;
            color: #831843;
            font-size: 0.95rem;
        }

    .input-group-custom {
        margin-bottom: 20px;
    }

    .input-label {
        font-weight: 500;
        color: #831843;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
    }

    .tooltip-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #ec4899;
        color: white;
        font-size: 0.7rem;
        cursor: help;
        margin-left: 5px;
        position: relative;
    }

        .tooltip-icon:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

    .tooltip-text {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        z-index: 1000;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background-color: #831843;
        color: white;
        text-align: center;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.85rem;
        white-space: nowrap;
        transition: opacity 0.3s;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        font-weight: 400;
    }

        .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #831843 transparent transparent transparent;
        }

    .form-input {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #f9a8d4;
        border-radius: 12px;
        font-size: 1.1rem;
        font-family: 'Roboto Mono', monospace;
        transition: all 0.3s ease;
        background: white;
    }

        .form-input:focus {
            outline: none;
            border-color: #ec4899;
            box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
            transform: translateY(-2px);
        }

    .input-range {
        font-size: 0.8rem;
        color: #9f1239;
        margin-top: 4px;
    }

    /* 結果卡片 - 漸層粉紅紫色 */
    .result-card {
        background: linear-gradient(135deg, #d946ef 0%, #ec4899 100%);
        color: white;
    }

    @media (min-width: 992px) {
        .result-card {
            position: sticky;
            top: 20px;
        }
    }

    .result-main {
        text-align: center;
        padding: 20px 0;
    }

    .result-label {
        font-size: 1.2rem;
        font-weight: 500;
        opacity: 0.95;
        margin-bottom: 5px;
    }

    .result-value {
        font-family: 'Roboto Mono', monospace;
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 15px;
        animation: pulse 0.5s ease;
    }

    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }

    .result-divider {
        border: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.3);
        margin: 15px 0;
    }

    .result-details {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        padding: 15px;
        margin-top: 15px;
    }

    .result-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

        .result-item:last-child {
            border-bottom: none;
        }

    .result-item-label {
        font-size: 1rem;
        opacity: 0.9;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .result-item-value {
        font-family: 'Roboto Mono', monospace;
        font-weight: 600;
        font-size: 1.2rem;
    }

    /* 戒圍對照表 */
    .ring-size-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    }

        .ring-size-table thead {
            background: linear-gradient(135deg, #d946ef 0%, #ec4899 100%);
            color: white;
        }

        .ring-size-table th,
        .ring-size-table td {
            padding: 12px 10px;
            text-align: center;
            font-size: 0.9rem;
        }

        .ring-size-table th {
            font-weight: 600;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .ring-size-table tbody tr:nth-child(even) {
            background: #fdf2f8;
        }

        .ring-size-table tbody tr:hover {
            background: #fce7f3;
        }

        .ring-size-table tbody tr.highlighted {
            background: linear-gradient(135deg, rgba(217, 70, 239, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%) !important;
            font-weight: 600;
            color: #831843;
        }

    .table-container {
        max-height: 400px;
        overflow-y: auto;
        border-radius: 12px;
    }

    /* 求婚技巧卡片 */
    .tips-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        margin-top: 15px;
    }

    .tip-card {
        background: white;
        padding: 20px;
        border-radius: 12px;
        border: 2px solid #f9a8d4;
        transition: all 0.3s ease;
    }

        .tip-card:hover {
            border-color: #ec4899;
            box-shadow: 0 8px 20px rgba(236, 72, 153, 0.2);
            transform: translateY(-3px);
        }

        .tip-card .tip-icon {
            font-size: 2.5rem;
            color: #ec4899;
            margin-bottom: 10px;
        }

        .tip-card .tip-title {
            font-weight: 600;
            font-size: 1.1rem;
            color: #831843;
            margin-bottom: 10px;
        }

        .tip-card .tip-desc {
            color: #9f1239;
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        .tip-card .tip-badges {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 10px;
        }

        .tip-card .badge {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .tip-card .badge-accuracy {
            background: #dcfce7;
            color: #166534;
        }

        .tip-card .badge-risk {
            background: #fee2e2;
            color: #991b1b;
        }

    /* 測量歷史記錄 */
    .history-list {
        margin-top: 15px;
    }

    .history-item {
        background: white;
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 10px;
        border-left: 4px solid #ec4899;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
    }

        .history-item:hover {
            box-shadow: 0 4px 15px rgba(236, 72, 153, 0.15);
            transform: translateX(5px);
        }

        .history-item .history-info {
            flex: 1;
        }

        .history-item .history-date {
            font-size: 0.85rem;
            color: #9f1239;
            margin-bottom: 5px;
        }

        .history-item .history-data {
            font-weight: 600;
            color: #831843;
        }

        .history-item .btn-delete {
            background: transparent;
            border: none;
            color: #f43f5e;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

            .history-item .btn-delete:hover {
                background: #fee2e2;
                color: #991b1b;
            }

    /* 按鈕樣式 */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @media (max-width: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .result-value {
            font-size: 2rem;
        }

        .measurement-method {
            flex-direction: column;
        }

        .method-option {
            width: 100%;
        }

        .tips-grid {
            grid-template-columns: 1fr;
        }
    }

    .chart-container {
        position: relative;
        height: 300px;
        margin: 20px 0;
    }

    /* 智能建議 */
    .recommendation-box {
        background: linear-gradient(135deg, rgba(217, 70, 239, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
        border-left: 4px solid #ec4899;
        padding: 15px;
        border-radius: 8px;
        margin-top: 15px;
    }

        .recommendation-box i {
            color: #ec4899;
            margin-right: 8px;
        }

        .recommendation-box p {
            color: #831843;
            font-weight: 500;
            margin: 0;
            line-height: 1.6;
        }