:root {
    --primary-bg: linear-gradient(135deg, #6e8efb, #a777e3);
    --text-color: #ffffff;
    --font-family: 'Roboto', sans-serif;
    --widget-width: 300px;
    --widget-padding: 20px;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-family);
    background: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Remove padding in embed mode */
body[data-embed="true"] {
    padding: 0;
    margin: 0;
    min-height: unset;
    height: 100%;
    background: transparent;
    overflow: hidden;
}

body[data-embed="true"] .container {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: none;
}

body[data-embed="true"] .widget-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body[data-embed="true"] .weather-widget {
    margin: 0;
    width: 100% !important;
    height: 100%;
    box-shadow: none;
}

/* Hide everything except the widget in embed mode */
body[data-embed="true"] .customization-panel,
body[data-embed="true"] .embed-section,
body[data-embed="true"] .container > *:not(.widget-container),
body[data-embed="true"] .widget-container > *:not(.weather-widget) {
    display: none !important;
}

.container {
    display: flex;
    gap: 40px;
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

/* Remove container padding in embed mode */
body[data-embed="true"] .container {
    padding: 0;
    gap: 0;
}

.weather-widget {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 20px;
    padding: var(--widget-padding);
    width: var(--widget-width);
    box-sizing: border-box;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Size-specific styles */
.weather-widget[data-size="small"] {
    font-size: 14px;
}

.weather-widget[data-size="small"] .temperature {
    font-size: 2.5em;
}

.weather-widget[data-size="small"] .weather-description {
    font-size: 1em;
}

.weather-widget[data-size="small"] .material-icons {
    font-size: 24px;
}

.weather-widget[data-size="small"] .weather-animation {
    width: 120px;
    height: 120px;
}

.weather-widget[data-size="medium"] {
    font-size: 16px;
}

.weather-widget[data-size="medium"] .temperature {
    font-size: 3em;
}

.weather-widget[data-size="medium"] .weather-description {
    font-size: 1.2em;
}

.weather-widget[data-size="medium"] .material-icons {
    font-size: 30px;
}

.weather-widget[data-size="medium"] .weather-animation {
    width: 150px;
    height: 150px;
}

.weather-widget[data-size="large"] {
    font-size: 18px;
}

.weather-widget[data-size="large"] .temperature {
    font-size: 3.5em;
}

.weather-widget[data-size="large"] .weather-description {
    font-size: 1.4em;
}

.weather-widget[data-size="large"] .material-icons {
    font-size: 36px;
}

.weather-widget[data-size="large"] .weather-animation {
    width: 180px;
    height: 180px;
}

/* Adjust widget in embed mode */
body[data-embed="true"] .weather-widget {
    box-shadow: none;
    width: 100%;
    height: 100%;
}

/* Hide unnecessary elements in embed mode */
body[data-embed="true"] .customization-panel,
body[data-embed="true"] .embed-section {
    display: none;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.location {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    left: 0;
    top: 0;
    transform: none !important;
}

#location-name {
    display: inline-block;
    position: relative;
    text-align: left;
    transform: none !important;

}

.weather-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-animation {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
    order: 1;
}

.temperature {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    order: 2;
}

#temperature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.unit {
    display: inline-flex;
    align-items: center;
    margin-left: 0.1em;
}

/* Prevent content after unit */
.unit::after {
    display: none !important;
    content: none !important;
}

/* Remove any decorative elements */
.temperature *,
#temperature *,
.unit * {
    text-decoration: none !important;
    border: none !important;
    line-height: 1;
}

/* Remove any generated content */
.temperature::before,
.temperature::after,
.temperature *::before,
.temperature *::after,
#temperature::before,
#temperature::after,
.unit::before,
.unit::after {
    content: none !important;
    display: none !important;
}

/* Remove any borders or underlines */
.temperature,
#temperature,
.unit {
    border: none !important;
    text-decoration: none !important;
    border-bottom: none !important;
    border-top: none !important;
    line-height: 1;
}

/* Ensure proper spacing between temperature and unit */
.temperature #temperature + .unit {
    margin-left: 0.1em;
}

.weather-description {
    font-size: 1.2em;
    margin-bottom: 15px;
    order: 3;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    width: 100%;
    order: 4;
}

.detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-input {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-fields {
    display: flex;
    gap: 10px;
}

.input-fields input,
.input-fields select,
#api-key {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
    background: #404040;
    color: #e0e0e0;
}

.hidden {
    display: none !important;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: #404040;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #505050;
}

.widget-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.embed-section {
    width: 100%;
    max-width: var(--widget-width);
}

.embed-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.preview-panel {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 10px;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
}

.preview-content input[type="text"] {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
    color: #e0e0e0;
}

.customization-panel {
    background: #333333;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 300px;
    color: #e0e0e0;
    position: sticky;
    top: 20px;
}

.panel-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h4 {
    margin: 0 0 15px 0;
    color: #e0e0e0;
    font-size: 1.1em;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.color-picker label {
    flex: 1;
    color: #e0e0e0;
}

select, input[type="color"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #404040;
    color: #e0e0e0;
}

input[type="color"] {
    height: 40px;
    padding: 2px;
}

#apply-customization {
    width: 100%;
    background: #404040;
    color: #e0e0e0;
    padding: 10px;
    font-weight: bold;
}

#apply-customization:hover {
    background: #505050;
}

#save-api-key {
    margin-top: 10px;
    width: 100%;
}

.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 30px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;

}


/* Remove any generated content around temperature */
.temperature::before,
.temperature::after,
.temperature *::before,
.temperature *::after,
#temperature::before,
#temperature::after,
.unit::before,
.unit::after {
    content: none !important;
    display: none !important;
}

/* Remove the rule that forces custom colors to always be visible */
#custom-colors {
    display: none;
}

.effect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.effect-option label {
    min-width: 100px;
}

.effect-option select {
    flex: 1;
    margin-right: 10px;
}

.effect-option input[type="color"] {
    width: 50px;
    padding: 0;
    height: 30px;
}

/* Text effect classes */
.text-shadow-light {
    text-shadow: 2px 2px 4px var(--text-shadow-color, rgba(0, 0, 0, 0.3));
}

.text-shadow-medium {
    text-shadow: 3px 3px 6px var(--text-shadow-color, rgba(0, 0, 0, 0.4));
}

.text-shadow-heavy {
    text-shadow: 4px 4px 8px var(--text-shadow-color, rgba(0, 0, 0, 0.5));
}

.text-stroke-thin {
    -webkit-text-stroke: 1px var(--text-stroke-color, #000);
}

.text-stroke-medium {
    -webkit-text-stroke: 2px var(--text-stroke-color, #000);
}