/* Screenshot Maker Styles - Dark Theme */

.preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background: rgba(30, 33, 48, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(58, 61, 74, 0.5);
    overflow: visible;
    min-height: auto;
}

.screenshot-preview {
    position: relative;
    width: 320px;
    height: 560px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

.screenshot-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.headline-text {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    word-wrap: break-word;
}

.device-frame {
    position: relative;
    width: 85%;
    max-width: 200px;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    transition: all 0.3s ease;
}

/* Screen area - viewport for the image */
.screen-area {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 216.67%; /* 9:19.5 aspect ratio for modern phones */
    overflow: hidden;
    background: #000;
    border-radius: 20px;
}

.screen-area img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.screen-area img.dragging {
    cursor: grabbing;
}

.screen-area img.fit-width {
    width: 100%;
    height: auto;
    min-height: auto;
}

.screen-area img.fit-height {
    height: 100%;
    width: auto;
    min-width: auto;
}

.device-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* iPhone Mockup */
.device-frame.iphone {
    background: #1a1a1a;
    padding: 8px;
    border-radius: 32px;
    box-shadow: 0 0 0 2px #3a3a3a, 0 20px 50px rgba(0, 0, 0, 0.5);
}

.device-frame.iphone .screen-area::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 28%;
    height: 2.2%;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

.device-frame.iphone .screen-area {
    border-radius: 24px;
    padding-bottom: 216.67%; /* 9:19.5 ratio for modern iPhones */
}

.device-frame.iphone img {
    border-radius: 24px;
}

/* Android Mockup */
.device-frame.android {
    background: #1a1a1a;
    padding: 6px;
    border-radius: 20px;
    box-shadow: 0 0 0 2px #3a3a3a, 0 20px 50px rgba(0, 0, 0, 0.5);
}

.device-frame.android .screen-area::before {
    content: '';
    position: absolute;
    top: 1.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    z-index: 10;
}

.device-frame.android .screen-area {
    border-radius: 16px;
    padding-bottom: 216.67%; /* 9:19.5 ratio for modern Android phones */
}

.device-frame.android img {
    border-radius: 16px;
}

/* iPad Mockup */
.device-frame.ipad {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 0 0 2px #3a3a3a, 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 280px;
    width: 90%;
}

.device-frame.ipad::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    z-index: 10;
}

.device-frame.ipad .screen-area {
    border-radius: 12px;
    padding-bottom: 133.33%; /* 3:4 ratio for iPad */
}

.device-frame.ipad img {
    border-radius: 12px;
}

/* Android Tablet Mockup */
.device-frame.android-tablet {
    background: #1a1a1a;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 0 0 2px #3a3a3a, 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 280px;
    width: 90%;
}

.device-frame.android-tablet::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    z-index: 10;
}

.device-frame.android-tablet .screen-area {
    border-radius: 10px;
    padding-bottom: 160%; /* 10:16 ratio for tablets */
}

.device-frame.android-tablet img {
    border-radius: 10px;
}

/* Landscape mode adjustments */
.device-frame.landscape {
    max-width: 320px;
    width: 95%;
}

/* Landscape screen area - horizontal aspect ratio */
.device-frame.landscape .screen-area {
    padding-bottom: 56.25%; /* 16:9 aspect ratio for landscape */
}

.device-frame.iphone.landscape .screen-area {
    padding-bottom: 46.15%; /* 19.5:9 ratio inverted for landscape iPhone */
}

.device-frame.android.landscape .screen-area {
    padding-bottom: 46.15%; /* 19.5:9 ratio inverted for landscape Android */
}

.device-frame.ipad.landscape .screen-area {
    padding-bottom: 75%; /* 4:3 ratio for landscape iPad */
}

.device-frame.android-tablet.landscape .screen-area {
    padding-bottom: 62.5%; /* 16:10 ratio for landscape tablet */
}

.device-frame.none-frame.landscape .screen-area {
    padding-bottom: 46.15%; /* 19.5:9 ratio inverted */
}

/* Landscape notch/camera positions */
.device-frame.iphone.landscape .screen-area::before {
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 2.2%;
    height: 28%;
    border-radius: 20px;
}

.device-frame.android.landscape .screen-area::before {
    top: 50%;
    left: 1.5%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
}

.device-frame.ipad.landscape::before {
    top: 6px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.device-frame.android-tablet.landscape::before {
    top: auto;
    left: 12px;
    bottom: 50%;
    transform: translateY(50%);
}

/* Tablet general styling */
.device-frame.tablet {
    max-width: 280px;
    width: 90%;
}

.device-frame.tablet.landscape {
    max-width: 320px;
    width: 95%;
}

/* No frame - just rounded */
.device-frame.none-frame {
    background: transparent;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.device-frame.none-frame .screen-area {
    border-radius: 20px;
    padding-bottom: 216.67%; /* 9:19.5 ratio */
}

.device-frame.none-frame.landscape .screen-area {
    padding-bottom: 46.15%; /* 19.5:9 ratio inverted for landscape */
}

.device-frame.none-frame img {
    border-radius: 20px;
} 
.subtext {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    margin-top: 15px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    word-wrap: break-word;
}

/* Controls Panel - Dark Theme */
.controls-panel {
    background: rgba(30, 33, 48, 0.95);
    border: 1px solid rgba(58, 61, 74, 0.5);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.control-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(58, 61, 74, 0.5);
}

.control-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.control-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: #e4e6eb;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-section h5 i {
    color: #5b8def;
}

.control-row {
    margin-bottom: 12px;
}

.control-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #b0b3b8;
    margin-bottom: 6px;
}

.control-row input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(58, 61, 74, 0.8);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(15, 17, 21, 0.6);
    color: #e4e6eb;
    transition: all 0.2s;
}

.control-row input[type="text"]:focus {
    outline: none;
    border-color: #5b8def;
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.2);
}

.control-row input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 2px;
    border: 1px solid rgba(58, 61, 74, 0.8);
    border-radius: 8px;
    cursor: pointer;
    background: rgba(15, 17, 21, 0.6);
}

/* Platform Selector */
.platform-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.platform-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(58, 61, 74, 0.8);
    border-radius: 10px;
    background: rgba(15, 17, 21, 0.6);
    color: #b0b3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.platform-btn:hover {
    border-color: #5b8def;
    color: #e4e6eb;
}

.platform-btn.active {
    background: linear-gradient(135deg, rgba(91, 141, 239, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: #5b8def;
    color: #fff;
}

.platform-btn i {
    font-size: 18px;
}

/* Gradient Presets */
.gradient-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gradient-btn {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(58, 61, 74, 0.8);
    border-radius: 10px;
    padding: 3px;
    cursor: pointer;
    background: rgba(15, 17, 21, 0.6);
    transition: all 0.2s;
}

.gradient-btn span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.gradient-btn:hover {
    transform: scale(1.1);
    border-color: #5b8def;
}

.gradient-btn.active {
    border-color: #5b8def;
    box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.3);
}

/* Size Presets */
.size-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-btn {
    padding: 10px 14px;
    border: 1px solid rgba(58, 61, 74, 0.8);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.6);
    font-size: 12px;
    font-weight: 500;
    color: #b0b3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.size-btn:hover {
    border-color: #5b8def;
    color: #e4e6eb;
}

.size-btn.active {
    background: linear-gradient(135deg, #5b8def 0%, #764ba2 100%);
    border-color: #5b8def;
    color: #fff;
}

.size-btn .size-label {
    font-weight: 600;
}

.size-btn .size-dims {
    font-size: 10px;
    opacity: 0.8;
}

/* Mockup Options */
.mockup-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mockup-btn {
    padding: 10px 16px;
    border: 1px solid rgba(58, 61, 74, 0.8);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.6);
    font-size: 13px;
    font-weight: 500;
    color: #b0b3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-btn:hover {
    border-color: #5b8def;
    color: #e4e6eb;
}

.mockup-btn.active {
    background: linear-gradient(135deg, rgba(91, 141, 239, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: #5b8def;
    color: #fff;
}

/* Download Button */
#download-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #5b8def 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(91, 141, 239, 0.3);
}

#download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 141, 239, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .screenshot-preview {
        width: 220px;
        height: 390px;
    }
    
    .headline-text {
        font-size: 14px;
    }
    
    .subtext {
        font-size: 10px;
    }
    
    .size-presets {
        flex-direction: column;
    }
    
    .size-btn {
        width: 100%;
        justify-content: center;
    }
    
    .controls-panel {
        padding: 16px;
    }
    
    .platform-selector {
        flex-direction: column;
    }
}

/* Hidden canvas for export */
#export-canvas {
    display: none;
}
