* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #ff9ec4 0%, #ffb3d1 50%, #ffc8df 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
    position: relative;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    .header {
        padding: 20px 10px;
        margin-bottom: 20px;
    }

    .logo {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .main-content {
        grid-template-columns: 1fr !important;
        gap: 20px;
        display: flex;
        flex-direction: column;
    }

    .controls-panel {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: 20px;
        border-radius: 15px;
        z-index: 1;
        order: 1;
        width: 100%;
        box-sizing: border-box;
    }

    .preview-panel {
        position: relative;
        z-index: 1;
        padding: 15px;
        border-radius: 15px;
        min-height: 300px;
        width: 100%;
        box-sizing: border-box;
        order: 2;
    }

    .control-group {
        margin-bottom: 20px;
    }

    .slider-input-group {
        gap: 10px;
    }

    .number-input {
        width: 60px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

.controls-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    z-index: 10;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.control-group {
    margin-bottom: 25px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.slider-label strong {
    color: #ff6b9d;
    font-size: 1.2em;
}

.slider-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #ffe0ec;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    touch-action: none;
}

.time-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ffe0ec;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b9d;
    text-align: center;
    background: white;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    font-family: inherit;
}

.time-input:focus {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.time-input:invalid {
    border-color: #ff6b9d;
}

.number-input {
    width: 70px;
    padding: 8px 10px;
    border: 2px solid #ffe0ec;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b9d;
    text-align: center;
    background: white;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input:focus {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fb3 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.4);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(255, 107, 157, 0.5);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fb3 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.4);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(255, 107, 157, 0.5);
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fb3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: rgba(255, 107, 157, 0.3);
    touch-action: manipulation;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.error-message {
    display: block;
    color: #ff6b9d;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
    min-height: 20px;
}

.preview-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.empty-state {
    text-align: center;
    color: #999;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.2rem;
    font-weight: 500;
}

.results-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: #ffe0ec;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-label {
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b9d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b9d;
}

.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-text {
    font-size: 0.95rem;
    font-weight: 400;
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-text-line {
    display: inline-block;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffe0ec 25%,
        #ff6b9d 50%,
        #ffe0ec 75%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    text-shadow: none;
}

.footer-text-line:nth-child(2) {
    animation-delay: 0.5s;
}

.heart {
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
    font-size: 1.1em;
    margin-left: 4px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.2);
    }
    20% {
        transform: scale(1.15);
    }
    40%, 60% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.05);
    }
}

.result-summary-card {
    background: #ffe0ec;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

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

.result-row-total {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid #ff6b9d;
    border-bottom: none;
}

.result-row-label {
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b9d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-row-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    text-align: right;
}

.result-row-total .result-row-label {
    font-size: 1.2rem;
}

.result-row-total .result-row-value {
    font-size: 1.8rem;
    color: #ff6b9d;
}

.share-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8fb3ff 0%, #6b9dff 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 179, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-tap-highlight-color: rgba(139, 179, 255, 0.3);
    touch-action: manipulation;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 179, 255, 0.4);
}

.share-btn:active {
    transform: translateY(0);
}

.share-icon {
    font-size: 1.3rem;
}

.share-text {
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .result-summary-card {
        padding: 20px;
    }

    .result-row {
        padding: 10px 0;
    }

    .result-row-label {
        font-size: 0.9rem;
    }

    .result-row-value {
        font-size: 1rem;
    }

    .result-row-total .result-row-label {
        font-size: 1.1rem;
    }

    .result-row-total .result-row-value {
        font-size: 1.5rem;
    }

    .share-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .header {
        padding: 15px 8px;
        margin-bottom: 15px;
    }

    .logo {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .controls-panel {
        padding: 15px;
    }

    .control-group {
        margin-bottom: 15px;
    }

    .number-input {
        width: 55px;
        padding: 5px 6px;
        font-size: 0.85rem;
    }

    .time-input {
        padding: 8px 10px;
        font-size: 0.95rem;
    }

    .preview-panel {
        padding: 15px;
        min-height: 300px;
    }

    .result-summary-card {
        padding: 15px;
    }

    .result-row-label {
        font-size: 0.85rem;
    }

    .result-row-value {
        font-size: 0.95rem;
    }

    .result-row-total .result-row-label {
        font-size: 1rem;
    }

    .result-row-total .result-row-value {
        font-size: 1.3rem;
    }

    .calculate-btn {
        padding: 14px;
        font-size: 1rem;
    }

    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

