:root {
            --primary: #f97316;
            --primary-light: #fff7ed;
            --primary-dark: #ea580c;
            --surface: #ffffff;
            --bg: #fff7ed;
        }

        body {
            background-color: var(--bg);
        }

        .tool-page .tool-container {
            max-width: 800px;
            background: var(--surface);
            border-radius: 24px;
            box-shadow: 0 20px 40px -5px rgba(249, 115, 22, 0.15), 0 10px 20px -5px rgba(249, 115, 22, 0.04);
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        .tool-cover {
            height: 180px;
            position: relative;
            background-color: var(--primary-light);
            overflow: hidden;
        }

        .tool-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .tool-cover::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(255, 247, 237, 0.1), rgba(255, 255, 255, 1));
        }

        .tool-header {
            text-align: center;
            padding: 0 2rem 2rem;
            position: relative;
            z-index: 1;
            margin-top: -50px;
        }

        .tool-header .icon-wrapper {
            background: white;
            width: 70px;
            height: 70px;
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            color: var(--primary);
            box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        .tool-header h1 {
            color: #431407;
            font-size: 2.2rem;
            margin-bottom: 0.5rem;
        }

        /* Tabs */
        .tabs-nav {
            display: flex;
            justify-content: center;
            margin-bottom: 2.5rem;
            background: #fff7ed;
            padding: 0.5rem;
            border-radius: 16px;
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
            border: 1px solid #ffedd5;
        }

        .tab-btn {
            padding: 0.8rem 1.5rem;
            border: none;
            background: transparent;
            font-family: var(--font-heading);
            font-weight: 600;
            color: #9a3412;
            cursor: pointer;
            border-radius: 12px;
            transition: all 0.2s;
        }

        .tab-btn.active {
            background: white;
            color: var(--primary);
            box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
        }

        /* Time Inputs */
        .time-box {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: #fff;
            padding: 0.5rem;
            border-radius: 12px;
            border: 2px solid #fed7aa;
        }

        .time-input {
            width: 70px;
            padding: 0.6rem;
            text-align: center;
            font-size: 1.25rem;
            font-weight: 700;
            border: none;
            background: transparent;
            color: #431407;
            -moz-appearance: textfield;
            appearance: textfield;
        }

        @media (max-width: 480px) {
            .time-input {
                width: 55px;
            }
        }

        .time-input::-webkit-outer-spin-button,
        .time-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .time-input:focus {
            outline: none;
            background: #fff7ed;
            border-radius: 6px;
        }

        .time-input.error {
            border: 1px solid red;
            background-color: #fee2e2;
        }

        .colon {
            font-size: 1.5rem;
            font-weight: 700;
            color: #fdba74;
            margin: 0 0.2rem;
        }

        .ampm-select {
            padding: 0.6rem;
            border: none;
            background: #fff7ed;
            border-radius: 8px;
            font-weight: 700;
            color: var(--primary-dark);
            cursor: pointer;
            font-size: 1rem;
        }

        .ampm-select.hidden {
            display: none;
        }

        .calc-row {
            display: flex;
            gap: 2rem;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 2rem;
        }

        .calc-label {
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 700;
            color: #9a3412;
            margin-bottom: 0.5rem;
            display: block;
        }

        /* Operation Toggle */
        .op-toggle {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .op-btn {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid #fed7aa;
            background: white;
            color: #c2410c;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .op-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: scale(1.05);
        }

        .op-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
            transform: scale(1.1);
        }

        /* Format Toggle */
        .format-toggle {
            display: flex;
            justify-content: center;
            margin-bottom: 1.5rem;
            gap: 1rem;
            align-items: center;
        }

        .format-btn {
            padding: 0.5rem 1rem;
            border: 1px solid #fed7aa;
            background: white;
            color: #9a3412;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .format-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        /* Calculate Button */
        .action-btn {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            color: white;
            width: 100%;
            max-width: 400px;
            padding: 1.2rem;
            border: none;
            border-radius: 16px;
            font-weight: 800;
            font-size: 1.1rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            display: block;
            margin: 2rem auto 0;
            box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.4);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 30px -5px rgba(234, 88, 12, 0.5);
        }

        /* Results */
        .result-panel {
            margin-top: 3rem;
            background: #fff7ed;
            border: 2px dashed #fed7aa;
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            display: none;
            position: relative;
        }

        .result-panel.show {
            display: block;
            animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .copy-btn {
            margin-top: 1rem;
            background: white;
            border: 1px solid #fed7aa;
            color: #c2410c;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .copy-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .res-value {
            font-family: 'Outfit', sans-serif;
            font-size: 3.5rem;
            font-weight: 800;
            color: #9a3412;
            line-height: 1;
            margin-bottom: 0.5rem;
        }

        .res-sub {
            color: #c2410c;
            font-size: 1.1rem;
            font-weight: 500;
        }

        /* Swap Button */
        .btn-swap {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid #fed7aa;
            background: white;
            color: #c2410c;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            margin: 0 0.5rem;
        }

        .btn-swap:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: rotate(180deg);
        }

        @keyframes popIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }