.recipe-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.recipe-header {
    background: #0088cc;
    color: white;
    padding: 24px;
    position: relative;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    min-width: 180px;
    transition: background-color 0.2s ease;
}

.meta-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.meta-content {
    flex: 1;
}

.meta-value {
    display: block;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 2px;
}

.meta-label {
    font-size: 0.85em;
    opacity: 0.9;
}

.meta-details {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.meta-detail {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    display: flex;
    gap: 5px;
}

.detail-label {
    opacity: 0.8;
}

.detail-value {
    font-weight: 500;
}

.recipe-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.btn-print {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
}

.btn-print:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.recipe-content {
    padding: 24px;
}

.recipe-column {
    margin-bottom: 32px;
}

.column-title {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0088cc;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.recipe-timer-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
}

.recipe-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.timer-display {
    font-size: 3em;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    color: white;
}

.timer-display .time-up {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}

.timer-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.timer-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.timer-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.timer-controls .btn:active {
    transform: translateY(0);
}

.btn-timer-play {
    background: #28a745;
    color: white;
}

.btn-timer-pause {
    background: #ffc107;
    color: #333;
}

.btn-timer-stop {
    background: #dc3545;
    color: white;
}

.btn-timer-reset {
    background: #6c757d;
    color: white;
}

.ingredients-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.ingredient-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.ingredient-item:hover {
    transform: translateX(3px);
    border-left-color: #0088cc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ingredient-item.checked .ingredient-name {
    text-decoration: line-through;
    opacity: 0.6;
}

.ingredient-item.checked .ingredient-amount {
    background: #6c757d;
}

.ingredient-checkbox {
    margin-right: 12px;
    margin-top: 2px;
}

.ingredient-checkbox input[type="checkbox"] {
    display: none;
}

.ingredient-checkbox label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.ingredient-checkbox label:hover {
    border-color: #0088cc;
}

.ingredient-checkbox input[type="checkbox"]:checked + label {
    background-color: #0088cc;
    border-color: #0088cc;
}

.ingredient-checkbox input[type="checkbox"]:checked + label:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.ingredient-content {
    flex: 1;
}

.ingredient-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ingredient-name {
    font-size: 1em;
    color: #333;
    font-weight: 500;
    flex: 1;
    margin-right: 12px;
    word-break: break-word;
}

.ingredient-amount {
    background: #0088cc;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9em;
    white-space: nowrap;
    flex-shrink: 0;
}

.ingredient-note {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
    padding-left: 4px;
    border-left: 2px solid #e9ecef;
    margin-left: 4px;
}

.steps-list {
    counter-reset: step-counter;
}

.step-item {
    position: relative;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.step-item:before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    top: -10px;
    left: -10px;
    width: 32px;
    height: 32px;
    background: #0088cc;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0, 136, 204, 0.3);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.step-number {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.step-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.step-time-icon {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9em;
}

.step-tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    color: #666;
    cursor: help;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
}

.step-tip-icon:hover {
    background: #0088cc;
    color: white;
    transform: scale(1.1);
}

.step-tip-icon svg {
    width: 14px;
    height: 14px;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .step-content {
        flex-direction: row;
    }
}

.step-image {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.step-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.step-image:hover .step-image-img {
    transform: scale(1.03);
}

.step-description {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
    flex: 1;
    min-width: 0;
}

.step-description p {
    margin-bottom: 10px;
}

.step-description p:last-child {
    margin-bottom: 0;
}

.nutrition-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 24px;
}

.nutrition-info h4 {
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.nutrition-note {
    font-size: 0.85em;
    opacity: 0.9;
    font-weight: normal;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nutrition-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease;
}

.nutrition-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.nutrition-value {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 4px;
}

.nutrition-label {
    font-size: 0.85em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-timer-start {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-timer-start:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.servings-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-servings {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    border: none;
}

.btn-servings:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.servings-current {
    font-size: 1em;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .recipe-container {
        margin: 0 10px;
    }
    
    .recipe-header {
        padding: 16px;
    }
    
    .recipe-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .meta-item {
        min-width: auto;
    }
    
    .recipe-content {
        padding: 16px;
    }
    
    .ingredient-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .ingredient-amount {
        align-self: flex-start;
    }
    
    .step-content {
        flex-direction: column;
    }
    
    .step-image {
        width: 100%;
        height: 200px;
    }
}

@media print {
    .recipe-actions,
    .servings-selector,
    .btn-timer-start,
    .recipe-timer-container,
    .step-tip-icon,
    .ingredient-checkbox,
    .step-icons,
    .step-tip-icon,
    .btn-timer-start,
    .recipe-timer {
        display: none !important;
    }
    
    svg {
        display: none !important;
    }
    
    .meta-icon::before,
    .column-title::before,
    .step-time-icon::before,
    .nutrition-info h4::before {
        content: "";
        display: inline-block;
        margin-right: 5px;
        font-size: 16px;
    }
    
    .meta-item.servings .meta-icon::before {
        content: "🍽️";
    }
    
    .meta-item.time .meta-icon::before {
        content: "⏱️";
    }
    
    .ingredients-column .column-title::before {
        content: "🥕";
    }
    
    .steps-column .column-title::before {
        content: "🧀";
    }
    
    .step-time-icon::before {
        content: "⏰";
    }
    
    .nutrition-info h4::before {
        content: "📊";
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        background: transparent !important;
        color: #000 !important;
    }
    
    .recipe-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .recipe-header {
        background: #fff !important;
        color: #000 !important;
        padding: 20px 0 !important;
        border-bottom: 2px solid #0088cc !important;
    }
    
    .recipe-meta {
        margin-bottom: 20px !important;
    }
    
    .meta-item {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
        min-width: auto !important;
        display: inline-block !important;
        margin-right: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .meta-icon {
        background: transparent !important;
        width: auto !important;
        height: auto !important;
        margin-right: 5px !important;
    }
    
    .recipe-content {
        padding: 20px 0 !important;
        display: block !important;
    }
    
    .recipe-column {
        margin-bottom: 30px !important;
        page-break-inside: avoid;
    }
    
    .column-title {
        border-bottom: 1px solid #0088cc !important;
        color: #000 !important;
        font-size: 18px !important;
        padding-bottom: 8px !important;
    }
    
    .ingredients-list {
        background: #fff !important;
        border: 1px solid #ddd !important;
        padding: 15px !important;
    }
    
    .ingredient-item {
        border-left: 2px solid #0088cc !important;
        margin-bottom: 8px !important;
        padding: 10px !important;
        break-inside: avoid;
    }
    
    .ingredient-amount {
        background: #0088cc !important;
        color: #fff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .steps-list {
        counter-reset: step-counter !important;
    }
    
    .step-item {
        border-left: 2px solid #0088cc !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        break-inside: avoid;
    }
    
    .step-item:before {
        background: #0088cc !important;
        color: #fff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .nutrition-info {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
        margin-top: 30px !important;
        padding: 15px !important;
    }
    
    .nutrition-info h4 {
        color: #000 !important;
        margin-bottom: 15px !important;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
    
    .nutrition-item {
        background: #fff !important;
        border: 1px solid #ddd !important;
        padding: 12px !important;
    }

    .ingredient-item:hover,
    .step-item:hover,
    .nutrition-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
        font-family: "Times New Roman", Times, serif !important;
    }
    
    h3, h4, h5 {
        page-break-after: avoid !important;
        margin-top: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .ingredient-item,
    .step-item,
    .nutrition-item {
        page-break-inside: avoid !important;
    }
    
    .recipes-section {
        margin-bottom: 30px !important;
    }
}

.step-tip-tooltip {
    position: fixed;
    z-index: 9999;
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    word-wrap: break-word;
    white-space: pre-line;
    animation: fadeIn 0.2s ease;
}

.step-tip-tooltip:before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #333;
    transform: rotate(45deg);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.btn-servings, .btn-timer-start, .btn-print {
    cursor: pointer;
    user-select: none;
}

.btn-servings:active, .btn-timer-start:active, .btn-print:active {
    transform: scale(0.95);
}

.icms-svg-icon {
    display: inline-block;
    vertical-align: middle;
}

.step-time-icon svg {
    width: 14px;
    height: 14px;
    fill: #666;
}

.step-time-text {
    font-size: 0.85em;
    margin-left: 2px;
}

.btn-timer-start svg {
    width: 14px;
    height: 14px;
}

.btn-print svg {
    width: 14px;
    height: 14px;
}

.btn-servings svg {
    width: 12px;
    height: 12px;
}

.column-title svg {
    width: 20px;
    height: 20px;
    fill: #0088cc;
}

.meta-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.nutrition-info h4 svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.timer-controls .btn svg {
    width: 16px;
    height: 16px;
}